|
Hello All ,
I want to write a code which will find(search) (.extension like (*.txt))files in the all system in vc++ .
Please help me
Thank You.
|
|
|
|
|
This[^] may help to you.
Do not trust a computer...
Always check what computer is doing
regards,
Divyang Mithaiwala
Software Engineer
|
|
|
|
|
|
WIN32_FIND_DATA data; FindFirstFile("*.txt", &data); and FindNextFile may help you
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
I am facing the following problem frequently when accessing data from Microsoft access
Key violation.
[Microsoft][ODBC Microsoft Access Driver] Could not find installable ISAM.
can any body advice solution
Trioum
|
|
|
|
|
Hi,
I am working on VS 2005 on Vista platform.
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.
TCHAR szPortName[MAX_PATH]=_T("");
_tcscpy(szPortName, _T("\\\\.\\"));
_tcscat(szPortName, _T("COM6:");
HANDLE hDeviceFile = CreateFile(szPortName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL);
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?
|
|
|
|
|
Found the problem.
I was specifying Port Name as _T("COM6:") while the correct was is _T("COM6") i.e, without the colon at the end.
|
|
|
|
|
Hi.
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.
Answer please..
modified on Monday, April 13, 2009 4:03 AM
|
|
|
|
|
Member 4672141 wrote: But how to get these information using c++ function.
You can't. C++ knows nothing of this sort of thing. You'll need to call NetUserModalsGet() to get such information.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thx!!! It's big help for me.
|
|
|
|
|
hello
Do u kow any S/w that provides me the source code of a dll (in win32)?
Thanks
|
|
|
|
|
yogeshs wrote: Do u kow any S/w that provides me the source code of a dll (in win32)?
NOPE
BTW do you seek information on the exported methods from the dll?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
You could use a decompiler like Reflector[^] if the binary was built with managed code (and wasn't obfuscated[^]).
With a Win32 DLL, well, good luck.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
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?
|
|
|
|
|
|
Hi All
How can i add string in list box fast?I have a file which have 1Lakhs lines.If am adding these line like this
if(file.Open(Name,CFile::modeRead))
{
CString strname;
while(file.end)
{
file.ReadString(strname.Trim());
if(strname.IsEmpty())
{
break;
}
else
{
m_list.InsertString(i,strname);
}
}
file.Close();
}
Then Dialog is showing notresponding.Plz help me How can i add fast.
|
|
|
|
|
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_
|
|
|
|
|
Put this code into a worker thread[^] so the UI remains responsive.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
this following piece of code is used in win32 programming.
this plays a vital role in servicing the messages.
CODE IS::
while (GetMessage (&msg, NULL, 0, 0)) {
TranslateMessage ( &msg );
DispatchMessage ( &msg );
}
i want to know how is it translating messages actually? (from which format to which format?)
thanks.
rakesh
|
|
|
|
|
The code looks self-explanatory, given the docs explain the APIs.
Rakesh5 wrote: (from which format to which format?)
Virtual-key messages to character messages[^], according to the documentation.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rakesh5 wrote: Re: can anyone explain this piece of code?
yes, A good book - say Charles Petzold
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
The role of TranslateMessage is to generate more "high lavel" messages from the "low level" ones that come directly from the input.
The typical case is WM_KEYDOWN/WM_KEYUP that, if observed for certain keys and shifts, generates WM_CHAR and WM_UNICHAR.
All new messages are re-posted on the same message queue, and hence fetched from GetMessage tehmselves.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
How to convert string “ABC” to “BCD”
into UNICODE?
CString strSource;
strSource = L"ABC";
TCHAR SourceFile[100];
_tcscpy(SourceFile, strSource );
MessageBox(SourceFile); // display "ABC" - OK!
below 3 operators are unproperly !
SourceFile[0] ++;
SourceFile[1] ++;
SourceFile[2] ++;
MessageBox(SourceFile); // display ">BC"
|
|
|
|