JuanCarlos wrote in message news:<506500000005000000C1920100-1079395200000@exchange.ni.com>...
> Hi,
>
> First of all make sure that you clear the watch window before
> compiling; this can slow down compiling time significantly. The next
> thing to check is where is this time being spent. Do you know if this
> extra time is spent compiling or linking? It is possible that going
> through the lib file to find the function is taking a lot of time.
> It's also possible that the h file contains references to other h
> files taking a long time to compile all the dependencies.
>
> You may want to pre-process the file to check the size of the file
> that actually being compiled and compare it with Vs without SDK calls.
>
> Please give this a try and let me know how this goes.
>
> Regards,
>
> Juan Carlos
> N.I.
First of all: I forgot to mention that I use version 5.5 of CVI.
To me, it seems that it is spent in compiling.
You can try to reproduce it with the following code, commenting out
the first line to see the difference with/without SDK:
//--------------CODE_BEGIN---------------------
#define USE_SDK_LIB
#ifdef USE_SDK_LIB
#include
#include
#endif
#include
#ifdef USE_SDK_LIB
int GetFolder(char* DirName) {
BROWSEINFO bi = { 0 };
LPITEMIDLIST ItemID;
LPMALLOC imalloc = NULL;
int ret;
bi.ulFlags = BIF_NEWDIALOGSTYLE;
bi.lpszTitle = "Select SESSION Directory";
ItemID = SHBrowseForFolder(&bi);
if( SHGetPathFromIDList(ItemID, DirName) ) {
ret = 1; //OK
}
else {
ret = 0; //no selection
}
// free memory used
if ( SUCCEEDED( SHGetMalloc ( &imalloc )) ) {
imalloc->lpVtbl->Free (imalloc, ItemID );
imalloc->lpVtbl->Release (imalloc );
}
return ret;
}
#endif
int main (int argc, char *argv[])
{
char dir[MAX_PATHNAME_LEN];
if (InitCVIRTE (0, argv, 0) == 0) {
return -1; /* out of memory */
}
#ifdef USE_SDK_LIB
GetFolder(dir);
#else
DirSelectPopup ("", "Select Directory", 1, 1, dir);
#endif
MessagePopup ("Selected dir", dir);
return 0;
}
//--------------CODE_END---------------------
Thanx 4 your help