View Full Version : pcWStr
ReneMiner
09-05-2020, 13:58
I want to wrap a few functions from a .dll to have it useable in thinbasic. Especially I want to know aboutPCWSTR , I know from the suffix it's kind of a string. But what exactly? Which one to use to substitute PCWSTR in thinbasic. And - for an idea to code: Did anyone already create some thinbasic-import-kit that would determine the original language and according to it replace code and keywords as much as possible to tb?
DirectuX
09-05-2020, 14:48
PCWSTR or LPCWSTR ?
https://stackoverflow.com/questions/2230758/what-does-lpcwstr-stand-for-and-how-should-it-be-handled-with
ReneMiner
09-05-2020, 15:00
Yes. Now I got it. Must be a pointer to a $Null-terminated wide string so 2 bytes per char...+ $Null
DirectuX
09-05-2020, 18:51
Yes. Now I got it. Must be a pointer to a $Null-terminated wide string so 2 bytes per char...+ $Null
You're welcome :D
ReneMiner
11-05-2020, 12:15
It even is already available in tb it's called
WStringZ.
If there were a translator that makes from example
PCWSTR someString
To
someString As WStringZ
and that according to is it local, global or within Type definition put in front the local, global or just $Tab ( but not exchange the original line - just comment- and maybe the rules if it's JavaScript or C# or whatever in some ini to know what is keywords or variables names and if have classes or just procedures - should be able to determine by file-ext. And be extendeable through the ini containing translation rules. It could speed up posting functions or scripts from other systems to tb. Maybe if I have time after I am done with the current I will think about it....