Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionKPDCStatus CreateDestinationFile( KPDCProcsPtr pProcs, KPDCLibMgrRef libMgr, char* fileName, KPDCFileRefHandle* fileRef) { KPDCStatus theStatus = KPDC_OK; char theFilePath[MAX_STRING_LENGTH]; KPDCUInt32 theAttributeSize = 0; HANDLE theFileHandle = INVALID_HANDLE_VALUE; //Installez le chemin du fichier // Set up the file path // strcpy(theFilePath, "D:\"); strcat(theFilePath, fileName); // créer le fichier // Create the file // theFileHandle = CreateFile( theFilePath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(theFileHandle == INVALID_HANDLE_VALUE) { theStatus = (KPDCStatus) GetLastError(); } else { *fileRef = (KPDCFileRefHandle) theFileHandle; } return(theStatus); }
theStatus = CreateDestinationFile( &theProcs, theLibMgr, gtheFileName, &theFileRef);
if(theFileRef != NULL) CloseFile(theFileRef);