Sign in to follow this  
Followers 0
igorm

Help with dllcall

15 posts in this topic

Hi,

I'm trying to use this with DLLCall, but I can't get it work. Can anybody help me with this. Also, any other way of using this could help, it does not have to be DLLCall.

Cheers :)

Share this post


Link to post
Share on other sites



You call functions with DllCall, not work with objects. What were you even trying? (code, I mean)

Share this post


Link to post
Share on other sites

That thread was about MSI (Windows installer) files. You are talking about "msp"? Was yours a typo or are you trying to do something completely different?

Share this post


Link to post
Share on other sites

Ah. I didn't know. It was just similar, and the p is close to the i key.

But still, I don't know that it is possible to load objects from dlls right now.

Share this post


Link to post
Share on other sites

Yes, this function ought to be callable through DllCall. Do you need help setting it up or are you just asking?

Share this post


Link to post
Share on other sites

Well it shouldn't be too hard, you need 3 strings, a number, 2 more strings, and another number. Those are pretty simple data types. I don't know what parameters you are calling it with though, but to set it up:

Dim $dll = DllOpen("msi.dll") ; you may need the full path
$return = DllCall($dll, "uint", "MsiGetPatchInfoEx", "string", $PARAM_1, "string", $PARAM_2, "string", $PARAM_3, "int", $PARAM_4, "string", $PARAM_5, "string", $PARAM_6, "ulong*", $PARAM_7)

Just replace each of the $PARAM_ variables with what you actually want to call the function with.

Share this post


Link to post
Share on other sites

Hi,

Thanks for help and I'm sorry for bothering you, but could you give me example. I never used DllCall so I have no idea how to start. I need to get "INSTALLPROPERTY_DISPLAYNAME". Also, where do I put path to file from which I want to read? Thanks again for you help.

Cheers :)

Share this post


Link to post
Share on other sites

I don't know anything about the function or the MSI patch system. As for that value, go back to the page you had. I think it displays the numbers for the constants on it.

Share this post


Link to post
Share on other sites

Dim $dll = DllOpen("msi.dll") ; you may need the full path
$return = DllCall($dll, "uint", "MsiGetPatchInfoEx", "string", $PARAM_1, "string", $PARAM_2, "string", $PARAM_3, "int", $PARAM_4, "string", $PARAM_5, "string", $PARAM_6, "ulong*", $PARAM_7)

Hello, i'm also interesting in DLL, and i see you code by chance .... it would be greatful if you can explain about the "uint", how do you know this's the "return type" ?

Thanks you


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

UINT MsiGetPatchInfoEx(

__in LPCTSTR szPatchCode,

__in LPCTSTR szProductCode,

__in LPCTSTR szUserSid,

__in MSIINSTALLCONTEXT dwContext,

__in LPCTSTR szProperty,

__out_opt LPTSTR lpValue,

__inout DWORD *pcchValue

);

This is the function definition. The UINT is a #define for unsigned int. That's how I knew.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites

Thanks


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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  
Followers 0