3/10/2024 0 Comments Dev me all topic combosIf an access violation occurs in AutoHotkey when the return type is "Str", either the return value is not a valid pointer, or the memory it points to is not null-terminated.ĭllCall("InfStrDll\GetWinInf", "uint", &InVar,"uint", &OutVar) allows me to read the input variable but any attempt to change the output results in garbageUsing this method does not update the variable's internal length field have you tried using VarSetCapacity(OutVar, -1) after DllCall, but before attempting to read OutVar? Otherwise I suppose it must not be null-terminating the string correctly. Is the access violation occurring in the Delphi module, or in AutoHotkey.exe? If in the Delphi module, I suppose it must be writing beyond the capacity of the variable. If the Delphi module is not null-terminating the string correctly, AutoHotkey may attempt to read beyond the end of the string to find the null-terminator. The difference between "uint", &InVar and "str", InVar is that "Str" updates the variable's internal length afterward - by searching for the null-terminator which should existing within the variable. May we see the Delphi function definition?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |