Skip to main content
gamedev.net
🔒 Locked

DirectXSetupGetEULA

Started by Omnimagus 0 replies 550+ views
Original Post
Omnimagus
Omnimagus
I've been working on an Installer and need to get the End User License Agreement for DirectX. So I wrote a little program to call the DirectXSetupGetEULA, but I don't recieve anything into my buffer. I've tried both char and wchar buffers. Here is the program. #include <stdio.h> #include "dsetup.h" #pragma comment(lib, "dsetup") int main() { WORD Lang = MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL); char szBuffer[20000]="Test\0"; WCHAR szwBuffer[20000]={0}; int nLen = MultiByteToWideChar(CP_ACP, 0, szBuffer, -1, NULL, NULL); MultiByteToWideChar(CP_ACP, 0, szBuffer, -1, szwBuffer, nLen); DirectXSetupGetEULA(szwBuffer,20000,Lang); if(DirectXSetupGetEULAA(szBuffer, 20000,Lang)==0) { if(ERROR_INVALID_PARAMETER==GetLastError()) printf("%s","Invalid Parameter\n"); } printf("%s\n",szBuffer); printf("%ls\n",szwBuffer); system("pause"); return 0; }
Sound made up
jollyjeffers
jollyjeffers
I'm not on my dev machine right now so can't check, but have you looked at the setup sample? I was looking at a couple of weeks ago and I'm pretty sure it covered most (if not all) of the DSetup functions. The sample code should work thus you can try and compare what they do with what you're doing...

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.