|
I changed it to char, so the single quotes don't work right now. I might change it back to WCHAR today, because I'm not getting the desired results. I do get an accurate count, but I'm trying to translate a vb function, so it needs to be the same.
I'm going to post an extension to the post above in about 10 minutes.
|
|
|
|
|
int wcsncmp( const wchar_t *string1, const wchar_t *string2, size_t count );
szFormat[i] is not a addr
for (int i = 0; i <= dwLength; ++i) {
if (wcsncmp(&szFormat [i], L"&", 1) ==0) {
++dwCount;
}
}
|
|
|
|
|
Hi everyone, I want to develop an application or whatever (driver), this will run before windows starts, and will ask for a password and if the password is correct system will continue to the windows. What can I do? Thanks.
|
|
|
|
|
The simplest thing would be to add a BIOS password[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I know that... But I want to write it myself.
|
|
|
|
|
Take a look at GINA[^], I think that is what you need to work with.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I want to launch a web address with ShellExecute in hidden way :
CString sLink = _T("http://www.codeproject.com/somepage/");
ShellExecute(NULL, NULL, sLink, NULL, NULL, SW_HIDE);
and goes well, but also, I want to close the launched application after execution ... how could I ?
|
|
|
|
|
If you want control over the spawned process, use CreateProcess()[^] instead.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Try using ShellExecuteEx() instead. It gives you back information that you can subsequently send to TerminateProcess() .
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hello,
I have trouble with an OnSize handler.
In the OnSize Handler of a view I call a "Tab->MoveWindow(...)"
But in this Tab-Control (of kind CBCGPTabWnd) I never step into the OnSize Handler when I'm sizing the framewindow.
I tested it with breakpoints and OutputDebugStrings.
I even set a breakpoint into the WindowProc function to test if a WM_SIZE message occurs, but it never happens.
If I reproduce this strange effect on 2 computers, it works all fine on the first, but the second one has this effect.
It's the same Exe-File, both computers are using Windows 7 64bit (with Visual Studio 2010)
Does anyone knows a solution??
Thanks ahead
Best wishes, Jan
modified 10-Feb-12 6:56am.
|
|
|
|
|
I am trying to get the resolution of all the monitors that are on connected to the system. Here is how I am trying to do
1) Read number of monitors in the system
2) For each monitor get the device info using EnumDisplayDevices().
3) In step2, I am getting all the info including DeviceName
4) Using the DeviceName from above I am calling EnumDisplaySettings(), but this function is always returning false except when I use NULL for the first parameter where it gives me details of primary monitor.
Any ideas why its returning false when using the DeviceName from step2.
thanks
PKNT
|
|
|
|
|
Quoting from MSDN:
Graphics mode indexes start at zero. To obtain information for all of a display device's graphics modes, make a series of calls to EnumDisplaySettings, as follows: Set iModeNum to zero for the first call, and increment iModeNum by one for each subsequent call. Continue calling the function until the return value is zero.
When you call EnumDisplaySettings with iModeNum set to zero, the operating system initializes and caches information about the display device. When you call EnumDisplaySettings with iModeNum set to a nonzero value, the function returns the information that was cached the last time the function was called with iModeNum set to zero.
Check if it helps
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
Thanks for the info. But I already tried this with the same result.
result = EnumDisplaySettings(lpdParams.DeviceName,0,&lpDMode);
where lpdParams is DISPLAY_DEVICE variable that has been populated with data returned from
EnumDisplayDevices(NULL, 1, &lpdParams, EDD_GET_DEVICE_INTERFACE_NAME);
Not sure where I am doing wrong.
thanks
PKNT
|
|
|
|
|
Do you have some sort of loop set up for this? Something like:
int result = -1;
for (int x = 0; result != 0; x++)
result = EnumDisplaySettings(lpdParams.DeviceName, x, &lpDMode);
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I have no loops for this functions. This function is called the same way I noted earlier after EnumDisplayDevices() only once.
thanks
PKNT
|
|
|
|
|
Kiran Satish wrote: I have no loops for this functions.
My bad. I just assumed when _AnsHUMAN_ suggested the same thing, that your "But I already tried this..." reply meant you were using a loop of some sort.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I found out that this problem is only on Windows 7, the function ran fine on XP. Any ideas about this issue on win7??
thanks
PKNT
|
|
|
|
|
Kiran Satish wrote: Any ideas about this issue on win7??
UAC, perhaps?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
UAC on my system is turned off. So, I guess its not causing the problem as the first function runs fine.
thanks
PKNT
|
|
|
|
|
Hello Friends,
I am planning to do MCTS: .NET Framework 4, Windows Applications and I was searching for study materials or dumps. Friends kindly help me if you have any study materials or dumps for this certification.
Regards,
S.Shanmugaraja
|
|
|
|
|
And you ask it at the native C++ forum?
Veni, vidi, vici.
|
|
|
|
|
Why are you asking here? This is a Microsoft certification so go to the Microsoft web site and search there.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Why do you need dumps. Dumps are the worst thing when it comes to certification. they take away the motivation for studies and i as i keep saying(learning is what matters the most in our profession)
|
|
|
|
|
Can be obtained?
Generally storage devices.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|