Jump to content
Tuts 4 You

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. Do you mean... ECM_FIRST equ 1500 or ECM_FIRST equ 1500h ...as I said, the CommCtrl.h I found on my computer is from 2017 and has not those defines inside. Long or int...just know hex or dec.
  4. ECM_FIRST is equal to 0x1500 and is defined in the CommCtrl.h header of the Windows SDK. A numerical value with the L suffix is used to have the value be interpreted as a 'long' value instead of the 'int' default.
  5. HI again guys, @adoxa What value is ECM_FIRST? What does this "L" mean? 0x0001L <-- what is this for a value? Just can use equ valueX hex or dec you know. Alright, I found some strange issue about that CR LF thing. I made a app in ASNI & UNICODE style and in both I do use an edit control to display a URL which I did break by the used URL parameters "?" "&" to display them line by line. So in case of the ANSI app it works but in case of UNICODE app it does not work == ? Why! I do same but get different results out. So this is my small code.... ANSI Version CONTROL "",IDC_INPUTPARAMETERS,"Edit",0x56a11004,5,90,400,140,0x00020200 .elseif ax == IDC_BreakParam ; break URL at params and print them out invoke GetDlgItem,hWin,IDC_URL mov esi, eax invoke SendMessage,esi,WM_GETTEXTLENGTH,0,0 .if eax invoke RtlZeroMemory,addr DropNameBuffer,sizeof DropNameBuffer invoke SendMessage,esi,WM_GETTEXT,sizeof DropNameBuffer,addr DropNameBuffer lea edi, DropNameBuffer xor ebx, ebx .while byte ptr [edi] != NULL .if byte ptr [edi] == '?' || byte ptr [edi] == '&' mov byte ptr [edi], 10 ; cr inc ebx .endif inc edi .endw invoke SetDlgItemText,hWin,IDC_INPUTPARAMETERS,addr DropNameBuffer UNICODE Version CONTROL "",IDC_INPUTPARAMETERS,"Edit",0x56a11004,5,90,400,140,0x00020200 .elseif ax == IDC_BreakParam ; break URL at params and print them out invoke GetDlgItem,hWin,IDC_URL mov esi, eax invoke SendMessage,esi,WM_GETTEXTLENGTH,0,0 .if eax invoke RtlZeroMemory,addr DropNameBuffer,sizeof DropNameBuffer invoke SendMessage,esi,WM_GETTEXT,sizeof DropNameBuffer,addr DropNameBuffer lea edi, DropNameBuffer xor ebx, ebx .while word ptr [edi] != NULL .if byte ptr [edi] == '?' || byte ptr [edi] == '&' mov byte ptr [edi], 10 ; cr inc ebx .endif inc edi inc edi .endw invoke SetDlgItemText,hWin,IDC_INPUTPARAMETERS,addr DropNameBuffer ...so in both cases I do check for '?' and '&' and when I found it I do change it by value 10 (dec) 0A (hex) for CR or LF (always forget that what is what). Then I just send the changed string to the edit control via SetDlgItemText function. In case of ANSI version it works to display all parameters line by line but in case of UNICODE all gets displayed in one line again. So what is here the reason why it works for A but not for W? The controls using same style. Makes me also wonder why it does work in case of ANSI. @Teddy Rogers So in first place I'm trying to get a rid of all those text styles. Main goal was it to change my apps from ANSI to UNICODE / SYMBOL support to display ALL my text I have correctly like in Notepad etc you know. I also found out that in case of using UNICODE app "__UNICODE__ EQU 1" I have to read / save my own text content as UTF-8 CodePage using EXTRA the WideCharToMultiByte function for all text I want to export to file and using MultiByteToWideChar function to read all text from output file into my app back to make it work to display all right. That's pretty annoying. Also in this case I have questions how to find out the right buffer length when using those functions. I see I can call them like this... The text has a length of 00003AF1h bytes (15089) edi = Buffer with text from extern file UTF-8 Function below should get length I need... invoke MultiByteToWideChar,CP_UTF8,0,edi,-1h,0,0 = 00003AE6h bytes (15078) = (11 bytes less) Then I double that space to alloc a free section Then calling same function with all parameters 0019FA10 00404631 /CALL to MultiByteToWideChar from bones.0040462C 0019FA14 0000FDE9 |CodePage = FDE9 0019FA18 00000000 |Options = 0 0019FA1C 007FE940 |StringToMap = "......stringstuff....." 0019FA20 00003AF1 |StringSize = 3AF1 (15089.) 0019FA24 00802BB8 |WideCharBuf = 00802BB8 0019FA28 000075CC \WideBufSize = 75CC (30156.) = eax 00003AE5h bytes / double size was written to buffer ...now in case of saving the text content... 0019F4AC 004043BB /CALL to WideCharToMultiByte from bones.004043B6 0019F4B0 0000FDE9 |CodePage = FDE9 0019F4B4 00000000 |Options = 0 0019F4B8 0045FAFC |WideCharStr = "/*=\" 0019F4BC FFFFFFFF |WideCharCount = FFFFFFFF (-1.) 0019F4C0 00000000 |MultiByteStr = NULL 0019F4C4 00000000 |MultiByteCount = 0 0019F4C8 00000000 |pDefaultChar = NULL 0019F4CC 00000000 \pDefaultCharUsed = NULL = eax 5 but it should be 4!=? Why 5? 0019F4AC 004043E1 /CALL to WideCharToMultiByte from bones.004043DC 0019F4B0 0000FDE9 |CodePage = FDE9 0019F4B4 00000000 |Options = 0 0019F4B8 0045FB08 |WideCharStr = "/*=\" 0019F4BC 00000008 |WideCharCount = 8 0019F4C0 0019F4D8 |MultiByteStr = 0019F4D8 0019F4C4 00000004 |MultiByteCount = 4 <---- I set to 4 not 5 0019F4C8 00000000 |pDefaultChar = NULL 0019F4CC 00000000 \pDefaultCharUsed = NULL = eax 0 <-- why 0? / ERROR_INSUFFICIENT_BUFFER So the text was written to buffer! 0019F4AC 004043FE /CALL to WideCharToMultiByte from bones.004043F9 0019F4B0 0000FDE9 |CodePage = FDE9 0019F4B4 00000000 |Options = 0 0019F4B8 0019F518 |WideCharStr = "Curl DL" 0019F4BC FFFFFFFF |WideCharCount = FFFFFFFF (-1.) 0019F4C0 00000000 |MultiByteStr = NULL 0019F4C4 00000000 |MultiByteCount = 0 0019F4C8 00000000 |pDefaultChar = NULL 0019F4CC 00000000 \pDefaultCharUsed = NULL = eax 8 but should be 7 = ? 0019F4AC 0040442F /CALL to WideCharToMultiByte from bones.0040442A 0019F4B0 0000FDE9 |CodePage = FDE9 0019F4B4 00000000 |Options = 0 0019F4B8 0019F518 |WideCharStr = "Curl DL" 0019F4BC 0000000E |WideCharCount = E (14.) 0019F4C0 00839D80 |MultiByteStr = 00839D80 0019F4C4 00000007 |MultiByteCount = 7 0019F4C8 00000000 |pDefaultChar = NULL 0019F4CC 00000000 \pDefaultCharUsed = NULL = eax 0 but text was written to buffer! Somehow it seems not to work correctly to get the right buffer size out I need to use for the translated strings and even when I use the buffer with correct size of buffer it does return 0 even the string was written into buffer correctly. It returns fail 0 but when I use more buffer size then it will also copy more bytes into new buffer I don't want to have there like any random or 0 bytes etc. So my question is how to use those 2 function correctly to get first the bytes I need and to call the function in second round correctly? Any advice would be welcome. PS: I'm still not finished with my UNICODE app to handle everything to double the sizes. Also in case of WM_GETTEXTLENGTH I need to double the result to alloc correctly buffer length to work go on with that. Those changes from ANSI to make a app source into UNICODE it really super PITA. Not sure how you guys handle that problem in your coding languages like C++ and others. greetz
  6. Yesterday
  7. If you want Win7 support then you have no choice: replace LF with CRLF. EM_SETEXTENDEDSTYLE (ECM_FIRST + 10) ES_EX_ALLOWEOL_CR 0x0001L ES_EX_ALLOWEOL_LF 0x0002L ES_EX_ALLOWEOL_ALL (ES_EX_ALLOWEOL_CR | ES_EX_ALLOWEOL_LF) ES_EX_CONVERT_EOL_ON_PASTE 0x0004L EM_SETENDOFLINE (ECM_FIRST + 12) EC_ENDOFLINE_DETECTFROMCONTENT 0 EC_ENDOFLINE_CRLF 1 EC_ENDOFLINE_CR 2 EC_ENDOFLINE_LF 3
  8. Last week
  9. I think we went off on a tangent anyway, I was trying to suggest checking the source file/s you are downloading before converting to Unicode. If you are confident the source file is an ANSI file there is function EngMultiByteToUnicodeN that you can try using. Can you attach the text file you are trying to convert, I'll have a look here... Ted.
  10. Hi again, @adoxa Thanks for the info. I could not test it yet because I don't have the define dec or hex values for those new styles? WS_EX_ACCEPTFILES equ 10h .... ES_EX_ALLOWEOL_CR ES_EX_ALLOWEOL_LF ES_EX_ALLOWEOL_ALL ES_EX_CONVERT_EOL_ON_PASTE ES_EX_ZOOMABLE EM_SETENDOFLINE EC_ENDOFLINE_DETECTFROMCONTENT EC_ENDOFLINE_CRLF EC_ENDOFLINE_CR EC_ENDOFLINE_LF I don't have them or found them yet. Just found a old commctrl.h file from 2017. Other problem is that it's just supported by some latest Vista or later. No Win7. Hmm. OK, the problem what could happen is that the text is not displaying as I want right. OK, lets test it. Just post the values next time or tell me where to find them etc. Thanks. @Teddy Rogers OK thanks you too. I will try to check that function some more with different string types to see how to use it in the best manner. greetz
  11. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @Teddy Rogers I see. many thanks. Regards. sean.
  12. Teddy Rogers

    Who can bypass this protected application to run it ?

    Yes, you need to wait for it to be approved. If you need help understanding/ resolving something then post it in one of the general forums. Please avoid posting a topic with an attachment with a comment along the lines of, "who can solve this...". Add information on what the problem is, what you tried and tools you have used, etc. The reason for this is to not have people litter the forums with attachments with the expectation others will do all the work for them and then not provide any meaningful information on how they resolved it. Members are supposed to be learning, adapting and solving their own problems in conjunction with others. You have been a long time member so this should not be new information for you! There is a brief guide in the FAQ/ Rules... Ted.
  13. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @Teddy Rogers do I need to wait for the approvement? Regards. sean.
  14. Teddy Rogers

    Who can bypass this protected application to run it ?

    Read the information that is given at the top of each forum/ category. https://forum.tuts4you.com/forum/146-challenge-of-reverse-engineering/ You have previously posted challenges, there is nothing different to those previous times... Ted.
  15. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @Teddy Rogers what is this? Or do I have to submit a file and wait for the admission? I tried a few times to submit crackmes but no admission was issued. So I posted them here. Regards. sean.
  16. Have a look on Wikipedia, it has an entry all about it, also check the references at the bottom of the page... https://en.wikipedia.org/wiki/Bush_hid_the_facts The code were tests I completed of the function a long time ago to check its results against different encoded text sources. Each flag is passed to the function to check against the string. It is probably a little convoluted to use for reference. To simplify the code, in short it looks like this... #IS_TEXT_UNICODE_STATISTICS = $0002 lpiResult = #IS_TEXT_UNICODE_STATISTICS If IsTextUnicode_(?STRING_Start, ?STRING_End-?STRING_Start, @lpiResult) If lpiResult = #IS_TEXT_UNICODE_STATISTICS Debug "The text is probably Unicode, with the determination made by applying statistical analysis." Else Debug lpiResult EndIf EndIf DataSection STRING_Start: Data.a "Bush hid the facts" STRING_End: EndDataSection Ted.
  17. Teddy Rogers

    Who can bypass this protected application to run it ?

    @Sean Park - Lovejoy if you are posting a challenge please do so in the correct area and not in some random forum. https://forum.tuts4you.com/forum/146-challenge-of-reverse-engineering/ In future I will consider locking or trashing these because there contains no information from you as to what you have done to resolve and answer your own problem/ question. When you have someone's attention in a topic please try not to coax them in to responding and answering another topic. I have moved all of @Sh4DoVV posts to the topic where they should have been replied to. Again, the question remains is the video player a challenge/ crackme that should have been posted in the correct forum/ area... Ted.
  18. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @boot how did you capture the video? it is protected with an option of anti screen recording. Regards. sean.
  19. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @boot Could you do it if I did not give the info of the hardware id and password? Regards. sean.
  20. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @boot Can you do this? https://workupload.com/file/Dn9u8UdXrtr Machine ID : bbf62-0446b-fecf2 Password : f5309564ad54b402f0359667d654b578893b9061ad54b472f0319615d155b07089339566d750b475f7369367d75ab57089329566f406e078d5 File ID : K01 And can you do this too? Regards. sean.
  21. Sean Park - Lovejoy

    Who can bypass this protected application to run it ?

    @jackyjask do you guess that it is a malware? certainly not. so try to bypass to run it please. Machine ID : 77feaac169-d41d8cd98f-0000000000 Password : 9d679667a05ab27084359160a655bb79 Regards. sean.
  22. jackyjask

    Who can bypass this protected application to run it ?

    are you sure??
  23. Is there anyone who can bypass this to run it? Let me know please. Click_Me.zip Regards. sean.
  24. Regarding EM_FMTLINES, from the 2003 R2 PSDK help: Vista and later have an extended style to recognise LF: ES_EX_ALLOWEOL_LF; 10 has an option to set the EOL character: EM_SETENDOFLINE.
  25. Hey Ted, thanks for new info's so far. I tried using that EM_FMTLINES message with TRUE & FALSE but in both cases my text in Edit control still look same without any line breaks all is displaying in one line. Multiline is enabled to see the entire full long text inside of Edit control and I also did set VSCROLL to scroll though the whole text but as I said, all gets displayed with one line etc. When I do copy the one line text and paste it into notepad then all is showing correctly. Seems that Notepad does handle this by itself already but how to handle it in my Edit control? About that IsTextUnicode issue. The "where it guesses wrong." website on microsoft is forbidden. Otherwise that code of yours looks pretty strange. So I have to check all possible flags and then? That entire string / page code thing is really confusing. As I said, normally I was just using ASNI strings in my codes but it's limited when I have to deal with UNICODE / SYMBOL chars. I still don't know what I should do in this case. 1.) Set __UNICODE__ EQU 1 in my source to make all unicode + double sizes after all functions who return the length of strings (lstrlen / wsprintf / other functions). Also in case of wsprintf I have to check buffer sizes extra because its limited to 1024 bytes only. 2.) Using mixed style of ANSI & UNICODE strings. Not so sure about it. How do you handle that problem guys? How do you that in PureBasic or C / C++ etc? Do you need to care about that or not? Oh by the way, I made my one app we talked a while ago to total Unicode and it seems to work but I had to change a lot of thing in the code and still don't know whether I did everything correctly so far. greetz
  26. Have you tried setting the edit control with EM_FMTLINES? I have some test code using IsTextUnicode that may be of help, see code block below. Raymond Chen suggests some alternate options... https://devblogs.microsoft.com/oldnewthing/20150223-00/?p=44613 EnableExplicit ; *********************************************************************************************************************** ;- Enumerations ; *********************************************************************************************************************** #IS_TEXT_UNICODE_ASCII16 = $0001 #IS_TEXT_UNICODE_REVERSE_ASCII16 = $0010 #IS_TEXT_UNICODE_STATISTICS = $0002 #IS_TEXT_UNICODE_REVERSE_STATISTICS = $0020 #IS_TEXT_UNICODE_CONTROLS = $0004 #IS_TEXT_UNICODE_REVERSE_CONTROLS = $0040 ;#IS_TEXT_UNICODE_BUFFER_TOO_SMALL = $0000 ; MSDN has this documented yet the value does not exist? #IS_TEXT_UNICODE_SIGNATURE = $0008 #IS_TEXT_UNICODE_REVERSE_SIGNATURE = $0080 #IS_TEXT_UNICODE_ILLEGAL_CHARS = $0100 #IS_TEXT_UNICODE_ODD_LENGTH = $0200 #IS_TEXT_UNICODE_DBCS_LEADBYTE = $0400 #IS_TEXT_UNICODE_NULL_BYTES = $1000 #IS_TEXT_UNICODE_UNICODE_MASK = $000F #IS_TEXT_UNICODE_REVERSE_MASK = $00F0 #IS_TEXT_UNICODE_NOT_UNICODE_MASK = $0F00 #IS_TEXT_UNICODE_NOT_ASCII_MASK = $F000 ; *********************************************************************************************************************** ;- Declarations ; *********************************************************************************************************************** Declare.i IsTextUnicodeV2(*String, *End) Declare.s ConcatenateFlags(FlagString.s, Flag.s, ValueToSearch, ValueToFind) Declare.s ConcatenateValues(lpiResult) ; *********************************************************************************************************************** ;- IsTextUnicode - File Tests ; *********************************************************************************************************************** Debug "ANSI" IsTextUnicodeV2(?ANSII_Start, ?ANSII_End) Debug "UTF8" IsTextUnicodeV2(?UTF8_Start, ?UTF8_End) Debug "UTF8_BOM" IsTextUnicodeV2(?UTF8_BOM_Start, ?UTF8_BOM_End) Debug "UTF16_BE" IsTextUnicodeV2(?UTF16_BE_Start, ?UTF16_BE_End) Debug "UTF16_LE" IsTextUnicodeV2(?UTF16_LE_Start, ?UTF16_LE_End) ; *********************************************************************************************************************** ;- IsTextUnicode - Datasection Tests ; *********************************************************************************************************************** Debug "DATA_ASCII" IsTextUnicodeV2(?DATA_ASCII_Start, ?DATA_ASCII_End) Debug "DATA_UNICODE" IsTextUnicodeV2(?DATA_UNICODE_Start, ?DATA_UNICODE_End) Debug "DATA_STRING" IsTextUnicodeV2(?DATA_STRING_Start, ?DATA_STRING_End) ; *********************************************************************************************************************** ;- IsTextUnicode - Memory Tests ; *********************************************************************************************************************** Define String1.s = "abcdefghijklmnopqrstuvwxyz" Define String2.s = "Bush hid the facts" ; https://en.wikipedia.org/wiki/Bush_hid_the_facts Define *Memory Define iSize Debug "MEMORY_ABC_ASCII" *Memory = Ascii(String1.s) iSize = StringByteLength(String1.s, #PB_Ascii) ;ShowMemoryViewer(*Memory, iSize) ;Debug PeekS(*Memory, Len(String1.s), #PB_Ascii) IsTextUnicodeV2(*Memory, *Memory+iSize) FreeMemory(*Memory) Debug "MEMORY_ABC_UTF8" *Memory = UTF8(String1.s) iSize = StringByteLength(String1.s, #PB_UTF8) ;Debug PeekS(*Memory, Len(String1.s), #PB_UTF8) ;ShowMemoryViewer(*Memory, iSize) IsTextUnicodeV2(*Memory, *Memory+iSize) FreeMemory(*Memory) ; https://en.wikipedia.org/wiki/Bush_hid_the_facts Debug "MEMORY_BUSH_ASCII" *Memory = Ascii(String2.s) iSize = StringByteLength(String2.s, #PB_Ascii) ;ShowMemoryViewer(*Memory, iSize) ;Debug PeekS(*Memory, Len(String2.s), #PB_Ascii) IsTextUnicodeV2(*Memory, *Memory+iSize) FreeMemory(*Memory) Debug "MEMORY_BUSH_UTF8" *Memory = UTF8(String2.s) iSize = StringByteLength(String2.s, #PB_UTF8) ;Debug PeekS(*Memory, Len(String2.s), #PB_UTF8) ;ShowMemoryViewer(*Memory, iSize) IsTextUnicodeV2(*Memory, *Memory+iSize) FreeMemory(*Memory) End Procedure.i IsTextUnicodeV2(*StringStart, *StringEnd) Protected lpiResult.l, Result, a Protected iSize = *StringEnd - *StringStart ; Create a temporary array structure. Structure istextunicode_value Align #PB_Structure_AlignC Flag.l EndStructure Protected Dim istextunicode_value.istextunicode_value(15) ; Add in the flag values. istextunicode_value(00)\Flag = #IS_TEXT_UNICODE_ASCII16 istextunicode_value(01)\Flag = #IS_TEXT_UNICODE_REVERSE_ASCII16 istextunicode_value(02)\Flag = #IS_TEXT_UNICODE_STATISTICS istextunicode_value(03)\Flag = #IS_TEXT_UNICODE_REVERSE_STATISTICS istextunicode_value(04)\Flag = #IS_TEXT_UNICODE_CONTROLS istextunicode_value(05)\Flag = #IS_TEXT_UNICODE_REVERSE_CONTROLS istextunicode_value(06)\Flag = #IS_TEXT_UNICODE_SIGNATURE istextunicode_value(07)\Flag = #IS_TEXT_UNICODE_REVERSE_SIGNATURE istextunicode_value(08)\Flag = #IS_TEXT_UNICODE_ILLEGAL_CHARS istextunicode_value(09)\Flag = #IS_TEXT_UNICODE_ODD_LENGTH istextunicode_value(10)\Flag = #IS_TEXT_UNICODE_DBCS_LEADBYTE istextunicode_value(11)\Flag = #IS_TEXT_UNICODE_NULL_BYTES istextunicode_value(12)\Flag = #IS_TEXT_UNICODE_UNICODE_MASK istextunicode_value(13)\Flag = #IS_TEXT_UNICODE_REVERSE_MASK istextunicode_value(14)\Flag = #IS_TEXT_UNICODE_NOT_UNICODE_MASK istextunicode_value(15)\Flag = #IS_TEXT_UNICODE_NOT_ASCII_MASK Debug "**********" Debug "iSize: " + iSize ; Cycle through all the flags stored in the array. For a = 0 To 15 lpiResult.l = istextunicode_value(a)\Flag Result = IsTextUnicode_(*StringStart, iSize, @lpiResult) If Result Debug "Flag being checked: $" + Hex(istextunicode_value(a)\Flag, #PB_Long) + " | lpiResult: $" + Hex(lpiResult, #PB_Long) Debug ConcatenateValues(lpiResult) EndIf Next a EndProcedure Procedure.s ConcatenateValues(lpiResult) Protected FlagString.s FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_ASCII16", lpiResult, #IS_TEXT_UNICODE_ASCII16) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_REVERSE_ASCII16", lpiResult, #IS_TEXT_UNICODE_REVERSE_ASCII16) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_STATISTICS", lpiResult, #IS_TEXT_UNICODE_STATISTICS) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_REVERSE_STATISTICS", lpiResult, #IS_TEXT_UNICODE_REVERSE_STATISTICS) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_CONTROLS", lpiResult, #IS_TEXT_UNICODE_CONTROLS) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_REVERSE_CONTROLS", lpiResult, #IS_TEXT_UNICODE_REVERSE_CONTROLS) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_SIGNATURE", lpiResult, #IS_TEXT_UNICODE_SIGNATURE) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_REVERSE_SIGNATURE", lpiResult, #IS_TEXT_UNICODE_REVERSE_SIGNATURE) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_ILLEGAL_CHARS", lpiResult, #IS_TEXT_UNICODE_ILLEGAL_CHARS) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_DBCS_LEADBYTE", lpiResult, #IS_TEXT_UNICODE_DBCS_LEADBYTE) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_NULL_BYTES", lpiResult, #IS_TEXT_UNICODE_NULL_BYTES) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_UNICODE_MASK", lpiResult, #IS_TEXT_UNICODE_UNICODE_MASK) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_REVERSE_MASK", lpiResult, #IS_TEXT_UNICODE_REVERSE_MASK) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_NOT_UNICODE_MASK", lpiResult, #IS_TEXT_UNICODE_NOT_UNICODE_MASK) FlagString.s = ConcatenateFlags(FlagString.s, "#IS_TEXT_UNICODE_NOT_ASCII_MASK", lpiResult, #IS_TEXT_UNICODE_NOT_ASCII_MASK) If FlagString.s = "" FlagString.s = "#NULL" EndIf ProcedureReturn FlagString.s EndProcedure Procedure.s ConcatenateFlags(FlagString.s, Flag.s, ValueToSearch, ValueToFind) Protected Space.s = " | " If ValueToSearch & ValueToFind = ValueToFind If Not FlagString.s = "" FlagString.s = FlagString.s + Space.s EndIf FlagString.s = FlagString.s + Flag.s EndIf ProcedureReturn FlagString.s EndProcedure ; *********************************************************************************************************************** ;- Datasection ; *********************************************************************************************************************** DataSection ANSII_Start: IncludeBinary "readme_ANSI.txt" ANSII_End: UTF8_Start: IncludeBinary "readme_UTF8.txt" UTF8_End: UTF8_BOM_Start: IncludeBinary "readme_UTF8_BOM.txt" UTF8_BOM_End: UTF16_BE_Start: IncludeBinary "readme_UTF16_BE.txt" UTF16_BE_End: UTF16_LE_Start: IncludeBinary "readme_UTF16_LE.txt" UTF16_LE_End: DATA_ASCII_Start: Data.a "abcdefghijklmnopqrstuvwxyz" DATA_ASCII_End: DATA_UNICODE_Start: Data.u "abcdefghijklmnopqrstuvwxyz" DATA_UNICODE_End: DATA_STRING_Start: Data.s "abcdefghijklmnopqrstuvwxyz" DATA_STRING_End: EndDataSection Ted.
  27. OK thanks Ted, So it seems to work OK so far when using 0 as last parameter. Not sure whether it will also work in case of those Symbol stuff in the string 💋🖤🧛‍♀️ etc. I can not use those symbols in WinASM itself to text it quickly so I also got just ??????? to see there. By the way, I have another question. So i was trying to display some same text on a static control & edit control and I got an issue. The text is not displaying same when the text has only an LF (10 / 0Ah) byte instead of CRLF (13,10 / 0Dh 0Ah). Why? In static control it does display with new lines and in edit control all is displaying in one line. That's some strange or? Is there any extra flag I have to use for Edit control to thread the LF / 0Ah byte like an CRLF? At the moment I wrote a function to replace all 0Ah bytes in text with 0D 0A to make it work but for this I have to alloc a new buffer. Just wanna know whether I can skip that part to handle it manually like this and just telling the edit control to display LF also as CRLF etc you know. greetz
  1. Load more activity
×
×
  • Create New...