PDA

View Full Version : Canon SDK - CDStartSDK fails when called from Explorer


marknelson
4th of May 2004 (Tue), 11:26
I'm attempting to write a WinXP shell extension to display thumbnails for my CRW files. However, whenever my component is called from Explorer, CDStartSDK returns cdMEM_ALLOC_FAILED. If I create a test harness and call the component from it, the call succeeds.

Does anyone know how the SDK attempts to allocate memory, or if this might be a bogus error message caused by some other failure?

On a related note, I have noticed that if my method contains the USES_CONVERSION macro, CDStartSDK will always fail, even when called from my test harness.

marknelson
5th of May 2004 (Wed), 07:52
I found the problem.

As I suspected, the error message is wrong. The SDK startup failed because it couldn't load its supporting libraries (other than CDSDK.dll).

Since shell extensions are COM components, their working directory is the same as the application that created them. In this case, that application is Explorer, whose working directory was something other than the directory that contained my component.

Anyway, to work around the problem I had to explicity load all of the supporting libraries into my component and everything works fine.

PhotoSlacker
5th of May 2004 (Wed), 09:18
Hey any idea where I can get a copy of the SDK?

Thanks

(Sorry I couldnt help you with your problem)