Thema: Delphi Is this correct and Safe

Einzelnen Beitrag anzeigen

Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#3

AW: Is this correct and Safe

  Alt 20. Aug 2010, 20:21
Should do fine imo, except for one thing: MessageBoxA is an API function, hence it uses PChar and not Delphi's internal string. You should pass a pointer to the first character instead of the string itself.
I'm not sure about the PushAd and PopAd stuff - I think it's for exception handling, isn't it? I can't tell if you're using those instructions correctly because I've never used them myself, but I think the easiest way to find that out is to just run the code and see if it works.
  Mit Zitat antworten Zitat