I am new to the Solidworks API and am trying to build an add-in using the Non-Attributed COM Wizard using C++. I'm running VS 2008 and Solidworks 2010 SP4 (x64). The Wizard generates a project which builds and runs fine. However, the output of loading the add-in into Solidworks shows several unusual things:
1) The Solidworks application is loading many DLLs from the System32 directory. Why is this the case since I am running Solidworks 2010 x64 on Vista 64-bit.
2) There are dozens of first-hand exceptions like the following:
'SLDWORKS.exe': Loaded 'C:\\Windows\\System32\\pngfilt.dll'
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0000001: 0xe0000001.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0000001: 0xe0000001.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0000001: 0xe0000001.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0434F4D: 0xe0434f4d.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0434F4D: 0xe0434f4d.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0434F4D: 0xe0434f4d.
First-chance exception at 0x7738619d in SLDWORKS.exe: 0xE0434F4D: 0xe0434f4d.
3) There are memory leaks detected:
The thread 'Win64 Thread' (0x60c) has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
{333} normal block at 0x000000000DB72EC0, 24 bytes long.
Data: < . . > C0 2E B7 0D 00 00 00 00 C0 2E B7 0D 00 00 00 00
{332} normal block at 0x000000000DB72E10, 64 bytes long.
Data: < B > 08 42 84 E9 FE 07 00 00 FF FF FF FF CD CD CD CD
Object dump complete.
The program '[3036] SLDWORKS.exe: Native' has exited with code 0 (0x0).
I have added no code to this project and changed no settings. This is a default build of the x64 configuration. Has anyone else seen this behavior or can help point me in the right direction to fix it? I am reluctant to start developing my own add-in when the baseline project seems so unstable.
Thanks,
Andrew Wilford
SolidworksApi macros