I have an mobile data card which exposes an Modem Port and this port appears as an device entry under "Modems" in the Device Manager.
In addition to this, the device has another port which i figured out by scanning through the registry and this port does not appear in the device manager.
This port appears in the list of available ports displayed by HyperTerminal and also in PortMon and I can connect and talk to the device via HyperTerminal.
But in my application when I try to do an CreateFile with that port name, the call fails with GetLastError() returning 2.
_tcscat(szPortName, _T("COM6:"); //assume the non-exposed port is COM6.
HANDLE hDeviceFile = CreateFile(szPortName,
GENERIC_READ | GENERIC_WRITE,
DWORD dwReturn = GetLastError();
Is there something wrong in the CreateFile() function call above.
Or is it that Vista allows only ports that are expose/displayed in the Device Manager for an Device to be used by an application?
I am making software of windows policy.
So I need to get windows password policy.
(e.g. minimum password age, maximum password age, minimum password length.. etc)
In windows, I can get these information using "net accounts" command.
But how to get these information using c++ function.
I checked "netapi32.dll", I couldn't find any related information.
I need your help.
My project is created in Visual C++ 2008 and use DirectX9.
There are many memory leak in my project after the ending of this program. Is there a artcile about solving the memory leak of Visual C++ 2008 in the Code Project?
You need to probably restructure your problem. First: Do you really need to display 1 lac lines in the list box...
I don't really think that any user for your application would be really interested in reading or going through that many lines of text at a time.
If not can you use some kind of paging mechanism rather than reading the whole file. Only read the number of records that you can display at a time.
You need to google first, if you have "It's urgent please" mentioned in your question. _AnShUmAn_
Last Visit: 31-Dec-99 18:00 Last Update: 22-Sep-23 9:37