CreateFile function Programming Software Development by mahnaz0098 … i connect to it some LEDs . i want to use CreateFile and WriteFile functions but i don't know that i… use LPT1 and LPT2 or COM1 and COM2 in CreateFile function. h = CreateFile( L"LPT1", // pointer to name of the… Re: CreateFile function Programming Software Development by Ancient Dragon … by using PROCMON.EXE from SysInternals to monitor calls to CreateFile() triggered by redirecting the output from DIR to a mapped… LPT port eg. dir >lpt3 >CreateFile("LPT3", GENERIC_WRITE | FILE_READ_ATTRIBUTES, FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0… CreateFile() Serial Communication with USB device Programming Software Development by fredyip … GPS data from a GPS usb device. I am using CreateFile() and all seems to be all right except for time… continuously send the data. I wrote a C++ program using CreateFile(), and I can collect the data streamed from the GPS… CreateFile on system volume Programming Software Development by crazylunatic I am writing a small app which uses CreateFile to get handles to the volumes present on a system. … GENERIC_ALL and the share mode is FILE_SHARE_WRITE. The call to CreateFile is successful for all volumes barring the system volume. I… Re: CreateFile on system volume Programming Software Development by NathanOliver … you out Physical Disks and Volumes You can use the CreateFile function to open a physical disk drive or a volume… system, even when the noncached option is not specified in CreateFile. You should assume that all Microsoft file systems open volume… CreateFile returns ERROR_FILE_NOT_FOUND when using interface path Programming Software Development by Thew … problem when I try to connect to my webcam using CreateFile. Using the SetupApi, I found the interface path of my… I supposed that when I use this interface path in CreateFile, I will be able to read from the webcam. But… Re: CreateFile() problems on Mobile 5.0 Programming Software Development by Ancient Dragon On your Mobile 5.0 computer, after exiting the application check the computer's memory to see that it really exited and not just hidden. Also, make sure the program closes the port before exiting. What is it trying to do in that tight loop ? Trying to open the port, but the CreateFile() failes? Re: Array of createfile handles Programming Software Development by lostangel556 …, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); comports[1] = CreateFile("\\\\.\\COM7", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL…); comports[2] = CreateFile("\\\\.\\COM8", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL… Re: Array of createfile handles Programming Software Development by mitrmkar …, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); comports[1] = CreateFile("\\\\.\\COM7", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL…); comports[2] = CreateFile("\\\\.\\COM8", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL… Failure of CreateFile() Programming Software Development by bops …szContent ) { HANDLE hFile; BOOL bSuccess = FALSE; DWORD dwTextLength; hFile = CreateFile( "data.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS ,…"setPassword()"); } else { MessageBox(hwnd,"setPassword(): CreateFile failed.",0,0); LastErrorMessage( "setPassword()"); // … Unexplained INVALID_HANDLE_VALUE from CreateFile() Programming Software Development by killdude69 …Scintilla and am currently having some issues with the CreateFile() function. It does not return an error when…help me very much. I have looked up the CreateFile() syntax on MSDN, and every parameter has the… an error. I am using Windows Vista. [CODE] file = CreateFile(fileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (… Array of createfile handles Programming Software Development by lostangel556 … usual syntax. e.g. [CODE]HANDLE comports[10]; comports[0] = CreateFile("\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);[/CODE… written to the port // Open COM port(s) HANDLE comport=CreateFile("\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); DCB… Re: Unexplained INVALID_HANDLE_VALUE from CreateFile() Programming Software Development by Yiuca … value of GetLastError() for you?) Because the return value of CreateFile() is INVALID_HANDLE_VALUE only if the function fails. As a 2nd… "guess" are you using the CreateFile() on a file that is deemed already open with the… Re: Unexplained INVALID_HANDLE_VALUE from CreateFile() Programming Software Development by killdude69 … value of GetLastError() for you?) Because the return value of CreateFile() is INVALID_HANDLE_VALUE only if the function fails. As a 2nd… "guess" are you using the CreateFile() on a file that is deemed already open with the… Re: Array of createfile handles Programming Software Development by lostangel556 … adding another \ escape character at the start [icode]comports[0] = CreateFile("\\\\.\\COM6", /* blabla */[/icode][/QUOTE] Thanks for the above… below as the code. [CODE]HANDLE comports[10]; comports[0]=CreateFile("\\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);[/CODE… Re: Array of createfile handles Programming Software Development by lostangel556 … below as the code. [CODE]HANDLE comports[10]; comports[0]=CreateFile("\\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);[/CODE… found the compiler wont allow me to assign the first createfile into comports[0]. It will let me use comports[1… Re: Failure of CreateFile() Programming Software Development by bops …] char * getContent( ) { HANDLE hFile; BOOL bSuccess = FALSE; LPSTR pszFileText; hFile = CreateFile( PASSWORD_FILE , GENERIC_READ , FILE_SHARE_READ , NULL , OPEN_EXISTING , 0 , NULL ); if( hFile != INVALID_HANDLE_VALUE… Re: Array of createfile handles Programming Software Development by Ancient Dragon That first code snippet compiled ok for me after adding another \ escape character at the start [icode]comports[0] = CreateFile("\\\\.\\COM6", /* blabla */[/icode] Re: Array of createfile handles Programming Software Development by Ancient Dragon Here is the complete program [code] #include <windows.h> int main() { HANDLE comports[10]; comports[0] = CreateFile("\\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); return 0; } [/code] Re: Array of createfile handles Programming Software Development by nezachem Your problem is that the line [QUOTE][CODE]comports[0]=CreateFile("\\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);[/CODE][/… Win32 CreateFile/WriteFile() problems Programming Software Development by Chuckleluck I'm having trouble using the CreateFile() and WriteFile() functions. Here's the code I've written: […++) { cout << cData[i] << endl; } HANDLE hFile = CreateFile(TEXT("FileBGP.txt"), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL… How to open a directory using createfile() ? Programming Software Development by krishnampkkm hii How to open a directory using createfile() ? Any idea..? Thanking you. Re: How to open a directory using createfile() ? Programming Software Development by kvprajapati [QUOTE=krishnampkkm;889855]hii How to open a directory using createfile() ? Any idea..? Thanking you.[/QUOTE] Use FILE_FLAG_BACKUP_SEMANTICS flag. Re: How to open a directory using createfile() ? Programming Software Development by Ancient Dragon … <fstream> using namespace std; int main() { HANDLE hFile = CreateFile("C:\\users", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0… Using CreateFile() from User Inputs Programming Software Development by marirs07 … port.Im able to Open a new one by using CreateFile(L\\\\.\\Com5, GENERIC_READ | GENERIC_WRITE, 0, // exclusive access NULL, // no security… Re: Using CreateFile() from User Inputs Programming Software Development by Ancient Dragon …; str << "\\\\.\\Com"; str << port; CreateFile(str.str(), ... ); java client server quiz. interesting!!! Programming Software Development by Jackie001 …) ; p.println("You are the lucky caller"); createFile c= new createFile(); c.createFilemain();//creating the questions file String file="… switch (fnum) { case 1: file="finalq1.txt"; createFile c1= new createFile(); c1.createFile1(); break; case 2: file="finalq2.txt… Console i/o redirection Programming Software Development by death_oclock …, //FILE_FLAG_DELETE_ON_CLOSE, NULL); if(!hStdOut) { hStdOut = CreateFile(L"Output.txt", GENERIC_READ, FILE_SHARE_WRITE, &…, //FILE_FLAG_DELETE_ON_CLOSE, NULL); if(!hStdErr) { hStdErr = CreateFile(L"Error.txt", GENERIC_READ, FILE_SHARE_WRITE, &… Win32 API Input/Output Question Programming Software Development by BruenorBH … Caption, MB_OK); return TRUE; case IDCANCEL: // Quit button end(); CreateFile("/Dat Files/StartTime.dat", GENERIC_WRITE, 0, NULL, OPEN_EXISTING…Dat Files/Break2Time.dat", strBreak2Start, 20, 20, NULL); CreateFile("/Dat Files/LeaveTime.dat", GENERIC_WRITE, 0, NULL, … help with GUI and fileSystem Programming Software Development by PonAngel ….CENTER); format.addActionListener(this); mount.addActionListener(this); createDIR.addActionListener(this); createFile.addActionListener(this); DeleteDIR.addActionListener(this); DeleteFile.addActionListener(this); editSave.addActionListener…