Advertisement

DirectX install function error

Started by September 09, 2017 10:23 AM
5 comments, last by kubera 7 years, 5 months ago

hi everyone

 

i want to convert the C++ code of the DirectXSetupGetEULAA() function to a vb.NET code; so my code is look like this:

Public Declare Function DirectXSetupGetEULAA Lib _
        "G:\Microsoft DirectX SDK (June 2010)\Redist\DSETUP.dll" _
        (ByRef lpszEULA As String,
         ByVal cchEULA As UInteger,
         ByVal LangID As Integer) As Integer

 

the original code (C++) is :


int DirectXSetupGetEULA(
         LPTSTR lpszEULA,
         UINT cchEULA,
         WORD LangID
)

theresult is : that this function does not return the specified string and the GetLastError() returns the error 183

ERROR_ALREADY_EXISTS
183 (0xB7)
 

Cannot create a file when that file already exists.

 

 

any solutions please

Hi!

The last parameter is 16bit unsigned short, it is rather: UShort than Integer
 

Advertisement

thnaks to kubera;

but this answer does not resolve th problem

OK, maybe DirectXSetupGetEULAW instead of DirectXSetupGetEULAA.
I guess, that DirectXSetupGetEULAA is ANSI, not UNICODE, it could be another reason.
(.NET is rather UNICODE layer). Here, I am not sure...

i have tested the DirectXSetupGetEULAW function but it still does not work (it gives the same error).

You would ask the question in https://gamedev.stackexchange.com/
Experts directly from Microsoft are contributing there.

This topic is closed to new replies.

Advertisement