Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

setupapi error


6 replies to this topic

harishv

harishv
  • Members
  • 25 posts

Posted 19 August 2003 - 01:42

hi,

i used the sample on this site that has the setupapi sample for InstallHinfSection() & followed up on the same lines for the SetupCopyOemInf () function. But, I get this error when this is executed..

/**********************/
Error in Setupapi
MissingEntry:SetupCopyOemInf
/**********************/

Here is the code snippet that i am using. is anything wrong here? or do i need to setup some environment variables? FYI, this function is to copy the inf file into the %windir%\inf directory. it is advised that on Win2K & XP we have to use this function & NOT just copy the .inf file.

/*************************************************************/
szCmd = "rundll32.exe";
szArg = "setupapi, SetupCopyOemInf " + svSrcInfDir + " " + szPostPath +
szCopyDeleteSource + " " + szNoBuffer + " " + " ";

if ( LaunchAppAndWait(szCmd, szArg, WAIT) < 0 ) then
MessageBox ("Failed to copy the inf file!!" + svSrcInfDir, SEVERE);
endif;
/*************************************************************/


Best Regards
HV

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 August 2003 - 15:43

Remove the blank between the , and SetupCopyOemInf:
szArg = "setupapi,SetupCopyOemInf " + svSrcInfDir + ...

harishv

harishv
  • Members
  • 25 posts

Posted 19 August 2003 - 16:02

tried that, but it still throws up the same error msg..

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 August 2003 - 16:06

The version of SetupAPI.dll on your machine may not support the SetupCopyOemInf function. See if the this function is exported by the dll on your machine. Otherwise you may need to update it.

harishv

harishv
  • Members
  • 25 posts

Posted 19 August 2003 - 16:26

yes, ur right. a dumpbin /exports setupapi.dll gives 2 entries for this function as
SetupCopyOemInfA & SetupCopyOemInfW. But, SetupCopyOemInf is missing!! I thought that is pretty much standard on Win2K & XP. Where can i get the latest versions?

This pops up 1 more question now!! How will i know that the setupapi.dll running on the target machine is the right version?

thanx
HV

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 August 2003 - 17:17

*A is the ANSI version of the function and *W is the unicode version. The *A should usually work but you can try both.

harishv

harishv
  • Members
  • 25 posts

Posted 19 August 2003 - 17:30

ya, i digged into setupapi.h & saw that these were defines for UNICODE & ANSI. I have tried it on XP & Win2K and keep getting the same error. dont know what to do!!

Edited by harishv, 19 August 2003 - 17:30.