Jump to content
Excelsior Forums
Sign in to follow this  
jransom

LPCSTR problem

Recommended Posts

Hi,

I have a dll file that has this structure:

Z4DLL_EXPORT_EX(BOOL)  Z4OpenEx(LPCSTR zw5Name);

so i tried:

   xFunction Z4OpenEx = new xFunction("z4dll32","long Z4OpenEx( UNICODESTRING )");

   Argument arg1=new Argument("C:\\",Argument.UNICODESTRING );

   Z4OpenEx.invoke(arg1);

and i also tried using just CSTRING.  

I get a segmentation fault each way.  I might be passing this information completely wrong.  PLEASE help me out, i want to buy your product for our company!

-james

Share this post


Link to post
Share on other sites

I suspect that you shall use CSTRING instead of UNICODESTRING. Also, return type in signature shall be 'int', not 'long'. And, finally, please make sure that Z4DLL_EXPORT_EX macro defines __stdcall functions (if you're using Windows version)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×