Hello,
where is an example project which illustrates how to receive string values from Win32 API calls?
Best regards,
Frank
InstallAware 9R2
Receive string values from Win32 API call
Re: Receive string values from Win32 API call
Dear Frank,
Which API function would you like to call?
Which API function would you like to call?
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Receive string values from Win32 API call
Hi,
this is the function GetPrinterDriverDirectory:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
But it would be great to know a common way to do this.
Best reagrds,
Frank
this is the function GetPrinterDriverDirectory:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
But it would be great to know a common way to do this.
Best reagrds,
Frank
Re: Receive string values from Win32 API call
Dear Frank,
This function (and most other WIN32 functions) returns a bool, not a string.
In such case, it is not possible to receive a string value back from the function because it is passed as a pointer and not returned.
This function (and most other WIN32 functions) returns a bool, not a string.
In such case, it is not possible to receive a string value back from the function because it is passed as a pointer and not returned.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Receive string values from Win32 API call
Hello Aviv,
which possibilities are available to get the printer driver directory with InstallAware?
How should be a wrapper function for the api GetPrinterDriverDirectory?
InstallAware don't know a string for return values for functions in c-dlls. What is the common way to retrieve strings?
Frank
which possibilities are available to get the printer driver directory with InstallAware?
How should be a wrapper function for the api GetPrinterDriverDirectory?
InstallAware don't know a string for return values for functions in c-dlls. What is the common way to retrieve strings?
Frank
Re: Receive string values from Win32 API call
Dear Frank,
The solution would be to write a DLL that allocates a string buffer, calls the API function, and returns a pointer to the allocated string buffer.
The solution would be to write a DLL that allocates a string buffer, calls the API function, and returns a pointer to the allocated string buffer.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Receive string values from Win32 API call
Hello Aviv,
>... and returns a pointer to the allocated string buffer
And what should do with this pointer to get the allocated string in a InstallAware variable?
Do you have any example for me? This would be a great help.
Best regards,
Frank
>... and returns a pointer to the allocated string buffer
And what should do with this pointer to get the allocated string in a InstallAware variable?
Do you have any example for me? This would be a great help.
Best regards,
Frank
Re: Receive string values from Win32 API call
You just set the return type to string.
Please provide me with a dll / win32api with a function that returns LPCWSTR and I will create an example for you.
Thanks!
Please provide me with a dll / win32api with a function that returns LPCWSTR and I will create an example for you.
Thanks!
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Receive string values from Win32 API call
Hi,
i found the solution. Thanks for your help.
Best regards,
Frank
i found the solution. Thanks for your help.
Best regards,
Frank
Re: Receive string values from Win32 API call
Sure, Frank. You an share it here if you'd like (so other users can learn too!)
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

