Are you sure that that is myTable and not myTable *?__declspec(dllimport) myTable myTableCreate();
I think "myTable myTable" is a typo and "Create()" is a type, you said earlier the function is called myTableCreate. In any case, you can't return a Win32::API::Struct as the return value since its not implemented (see https://github.com/bulk88/perl5-win32-api/blob/master/API.xs#L767 and https://github.com/bulk88/perl5-win32-api/blob/master/API.pm#L287 ), hmm, that fact is not in the pod, I better fix that.my $CreateTable = new Win32::API("myDll.dll","myTable myTable Create() +");
Get rid of the const. It wont parse for sure. Try replacing LpMyTable with LPHANDLE, or upgrading to my version of Win32::API if you want a less quirky struct system, https://github.com/bulk88/perl5-win32-api . Reread the pod in my version also.my $LoadTableFromFile = new Win32::API("myDll.dll","int myTableLoadFro +mFile(char const* filename, LPMyTable pointToMyTable)")
enums won't parse and are not supported by Win32 API. Change "enum myStatus" to an int (I think you already did that), and write some perl code, maybe as a hash, to decode the int to an english identifier. Also get rid of __declspec(dllimport), that won't parse either. As nice as Win32 API's C prototype parsing system sounds https://github.com/bulk88/perl5-win32-api/blob/master/API.pm#L417, it is nowhere near what a real C compiler will parse, improve it if you can ( I couldn't ), the info you need is here http://msdn.microsoft.com/en-us/library/ttt561z3.__declspec(dllimport) enum myStatus myTableLoadFromFile(char const* fi +lename, MyTable* pointToMyTable);
In reply to Re: WIN32::API and void*
by bulk88
in thread WIN32::API and void*
by sgv_81
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |