Hello gurus, Please be patient with a newbie. Everywhere I look on the web I see code with these strange vriable types written in capitals like "DWORD" or "HANDLE". Pleople just declare them without having a class of type dword or handle. When I try to use such code, ofcourse the compiler says: 'DWORD' : undeclared identifier I am trying to use a function called CreateFile which has the attributes: HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDispostion, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); It return type is "HANDLE". What the? Theres no such thing. Is it an int? MSDN says that "dwDesiredAcess" has to be either 0, GENERIC_READ or GENERIC_WRITE. Is GENERIC_READ a string or what? When I try to use the the function. ie: hComm = CreateFile(portname, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); The compiler says: 'GENERIC_READ' : undeclared identifier. Look, this is a basic question that has porbably been answered elsewhere? But what am I supposed to search for? "variable types written in CAPITALS"? Pleas help.
A
afil6545
@afil6545