|
-
February 28th, 2011, 08:46 AM
#1
Problem Calling Win32 DLL function
Hi All,
I have following function in win32 DLL
BSTR _stdcall dec(unsigned long isize,long* iReturn);
I want to call this function in Perl script. I have tried different fuctions in perl but stuck on this. Please help me out and provide your valuable solutions.
I have tried the following code but did not get success:
/******************************************************************/
#!/usr/bin/perl
use Win32::API;
Win32::API::Type->typedef( 'OLECHAR', 'WCHAR' );
Win32::API::Type->typedef( 'BSTR', 'OLECHAR' );
my $xy=0;
my $cc=\$xy ;
Win32::API->Import('MyDLL', 'char* dec(long a,long b)')or die $^E;
my $var=dec(4,$cc);
printf("%s",$var);
/******************************************************************/
Thanks in Advance,
:-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|