VMware {code} Community
flatino
Contributor
Contributor

Suppress warning popup for missing library

Hello,

if I run the sample code vixDiskLibSample.cpp (on both Windows and Linux systems) and a DLL / SO is missing, I have a popup in Windows and a prompting message on Linux which is stopping

the application to continue and it requires the manual user intervention: is there a way to suppress this warning ?

As example:

- Rename libeay32.dll so that it is not found when running VixDiskLib_Init method

- you will get a popup with the error message and you have to click "OK" button to continue

(on Linux you have a "Press ENTER to continue".....)

I would prevent any popup/prompting message to appear: is there a way ?

I implemented my own logger method as follows

----


void logger(const char *fmt)

+ { <MY_LOGGER_CODE> }+

VixDiskLib_Init(VIXDISKLIB_VERSION_MAJOR, VIXDISKLIB_VERSION_MINOR, &logger,&logger,&logger, NULL);

----


and it is correctly invoked but still the warning popup appears.....Is there a way to remove it ?

Thanks,

Francesco

0 Kudos
2 Replies
jedwards_mcafee
Contributor
Contributor

On Windows, use SetErrorMode(SEM_FAILCRITICALERRORS)

0 Kudos
flatino
Contributor
Contributor

Hi jedwards and thanks for your suggestion but it did not solve my problem.

I used SetErrorMode as you suggested in several ways and checked the values to be sure but the popup always appeared.

I also executed the SetErrorMode inside my own logger which I pass to VixDiskLib_Init: the ErrorMode value was correctly set but the popup appeared.

Since I have a similar behaviour on Linux where I got a "Press ENTER to continue" when a .so is missing I think the problemis inside VMDK API and not in Windows.

The popup is which shows the missing library is VMWAre specific (the same on Linux).

The warning popup says "VMWare Workstation unrecoverable error: (app)" SSLLoadSharedLibrary: failed to load library ---> I think the VMDK API code is prompting this message....

So my idea is that there should be something (an option) to disable VMDK API to prompt this popup when a missing library is found (on both Linux and Windows code).

Thanks,

Francesco

0 Kudos