Home > Software engineering >  SHGFI_SYSICONINDEX obstruction in the laptop Windows 7
SHGFI_SYSICONINDEX obstruction in the laptop Windows 7

Time:09-21

Years ago wrote a software used bcg7.2, under a 64 bit Windows 7 desktops is normal, but in the notebook for under 64 bit Windows 7, memory to about 5 m stopped (process in, but they were fixed memory to 5 m, software is not up, nor an error), after debugging found that blocking in the BCG SHGetFileInfo calls, and only use the SHGFI_SYSICONINDEX parameters will be blocked, but this function is called in the exe is not blocked, had no idea, ask prawn!
(laptop and desktop environment for more than just a VRV, unload the also not line, and there are rising, also disable all monitoring),
Set up a running XP compatibility and administrator privileges to run the software, the debug window shows First - chance exception in xx. Exe (KERNELBASE. DLL) : 0 x000006ba: (no name), according to the check the print services launched the also not line,
Have any ideas?? Monkeys [question]

CodePudding user response:

Just found that the CoInitialize SHGetFileInfo before are removed in the dynamic library is ok, but why??

CodePudding user response:

Consult the MSDN SHGetFileInfo Remark in the section of https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-shgetfileinfow

CodePudding user response:

Carefully checked again, no call CoInitialize elsewhere

CodePudding user response:

5 m or so stop to experience personal firewalls, antivirus software to prevent the possibility of large

CodePudding user response:

Tried the antivirus, VRV uninstalled, firewall closed, still won't do, and found that it is only in the global variable structure dynamic library function call has a problem, in exe global variables or directly call dynamic library exported functions are no problem, completely confused

CodePudding user response:

Try to construct the call before initialize the COM

CodePudding user response:

refer to 6th floor zgl7903 response:
try to construct the call before initialize the COM

Is the callback is blocked, remove the CoInitialize
  • Related