Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.4 KiB

  1. #include <precomp.h>
  2. #pragma hdrstop
  3. #if 0
  4. BOOL
  5. LegacyInfInterpret(
  6. IN HWND OwnerWindow,
  7. IN PCSTR InfFilename,
  8. IN PCSTR InfSection,
  9. IN PCHAR ExtraVariables,
  10. OUT PSTR InfResult,
  11. IN DWORD BufferSize,
  12. OUT int *InterpResult
  13. );
  14. #endif
  15. CHAR ExtraVars[] = { "ExtraSymbol1\0"
  16. "ExtraValue1\0"
  17. "ExtraSymbol2\0"
  18. "ExtraValue2\0"
  19. "ExtraSymbol3\0"
  20. "ExtraValue3\0"
  21. "ExtraSymbol4\0"
  22. "ExtraValue4\0"
  23. "ExtraSymbol5\0"
  24. "ExtraValue5\0"
  25. };
  26. VOID
  27. DoIt(
  28. VOID
  29. )
  30. {
  31. HMODULE h;
  32. FARPROC p;
  33. int i;
  34. BOOL b;
  35. CHAR Result[256];
  36. CHAR Filename[MAX_PATH];
  37. if(h = LoadLibrary("setupdll")) {
  38. if(p = GetProcAddress(h,"LegacyInfInterpret")) {
  39. b = p(
  40. NULL,
  41. "test.inf",
  42. "TestSection",
  43. ExtraVars,
  44. Result,
  45. sizeof(Result),
  46. &i
  47. );
  48. } \
  49. //
  50. // Make SURE it's gone.
  51. //
  52. while(GetModuleFileName(h,Filename,MAX_PATH)) {
  53. FreeLibrary(h);
  54. }
  55. }
  56. }
  57. VOID
  58. __cdecl
  59. main(
  60. IN int argc,
  61. IN char *argv[]
  62. )
  63. {
  64. DoIt();
  65. DoIt();
  66. DoIt();
  67. DoIt();
  68. DoIt();
  69. }