![]() ![]() ![]() I also suggest you to read about class helpers and record helpers - that might help you with re-introducing some obsoleted functions in libraries, and delaying re-working of the codebase. There is also a lot of articles in google. You I would use ordinals instead (you should also take UTF-16 surrogates into account properly, but I will leave that as an exercise for you), eg: function StrToRichText(const Str: string): string Ībout Unicode you're already been addressed. They don't make as much sense in a Unicode world, and they are rarely even used in an Ansi world.Īnother case where you need to re-write the code to account for Char=WideChar now, since character ranges are much larger than Ansi character ranges. However, you should re-think why you still need to deal with OEM strings in the first place. In D2009 , PChar maps to PWideChar now, not to PAnsiChar anymore, so you need to re-write your code accordingly, eg: function OemToAnsi(const Str: AnsiString): string The first parameter of both functions is a PAnsiChar. In D2009 , OemToChar() maps to OemToCharW() now, not to OemToCharA() anymore. Make sure your uses clause includes Winapi.Windows, or that Winapi is inluded in your Project's "Unit Scope Names" field in the Project Options if the uses clause includes 'Windows' instead (which it likely does since you are migrating). 'OemToChar()' is declared in '', just like the IDE says. Result := Result '\''' LowerCase(IntToHex(Ord(Str), 2)) Getting error 'Low Bound Exceeds High Bound' in following code.įunction StrToRichText(const Str: string): string.Incompatiable Types: 'PAnsiChar' and 'PWideChar' in below function on line with OemToChar(p1, p2).įunction OemToAnsi(const Str: string): string What is the location of windows.pas located on the system ? or How to resolve it ? ![]() I am not able to open any delphi component file. When I Ctrl Click on that function it shows message Unable to locate ''. I am not able to find defination of function OemToChar in XE3. Can someone please help me to resolve these. I am getting some erros while compiling it. I am migrating my Delphi 5 application to Delphi XE3. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |