|
No. i want an non MFC based application. can u provide me with some help
|
|
|
|
|
MFC is a thin wrapper around the windows API. The article provides the how-to of the question you asked, you just have to strip out the MFC stuff to get the API stuff you want.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Anonymous wrote:
can u provide me with some help
Sure,Why dont you try it by urself, I will love to assist you in your problem!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Please help me.
I use the SHSetFolderPath function to Assigns a new path to a system folder through its CSIDL.But it return fail.The source code as follow:
HRESULT hr = NULL;
HINSTANCE hLib = NULL;
typedef HRESULT (WINAPI *SHSetFolderPath(int,HANDLE,DWORD,WCHAR*);
hLib = LoadLibrary("shell32.dll");
if(hLib)
{
SHSetFolderPath lpfSHSetFolderPath;
lpfSHSetFolderPath = (SHSetFolderPath)GetProcAddress(hLib,(LPTSTR)232);
hr = lpfSHSetFolderPath(CSIDL_FAVORITES,NULL,0,L"E:\\TestFolder");
}
The "hr" return value is not S_OK,why?
Thanks
|
|
|
|
|
What is the value of hr? Did you use the "Error Lookup" tool to see what that value means?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
The value of "hr" is -2147024809.I cannot find there is some problem about the parameter.
|
|
|
|
|
Hi, i'm trying to read the output of an accelerometer using the parallel port. The output of the accelerometer is a pulse width.
The question:
1. My system is Windows 2000, for some reason it won't allow me to read from the port. I have installed one of the dll suggested in the examples
2. How do I read the rise time or duty cycle of the pulse width.
3. IS Matlab implemenatation better
Thanks a lot
|
|
|
|
|
Read this article about parallel port communications.
About the rise time and the duty cycle, I am not completely sure on how to track down the time that it takes for the signal to switch from 0 to 1. You could sample the input at very high clock rates but in order to do that you need some background on timers so take a look at this other article.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
I ran accross a protection tool called Ultraprotect. Here's something that caught my attention: www.ultraprotect.com/dynamiccode.htm[^]. There's a prolog / epilog style encryption decryption (most likely done in __asm blocks). This makes the crackers life a tad bit harder by making them unpack certain parts of the code manually.
I'd like to learn how to implement something like this myself. If anyone has experience with this type of coding please give me some helpful links/pointers.
Alex Korchemniy
|
|
|
|
|
Alex Korchemniy wrote:
This makes the crackers life a tad bit harder by making them unpack certain parts of the code manually.
Not really. All they have to do is extract the full code for the method into another application, delete the epilog part and run it. voila. Code cracked. It might take them an extra 5 minutes. It would be easy to write a tool to search through the executable for the prolog and epilog bits, decrypt the code and remove the prolog/epilog, thus defeating the encryption completely.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I understand... I can do that myself.
I'd just like some hints as to whats a good way to start implementing something like this. I'm planning to add on to it later(mingle code with encryption so that the entire block never shows) once I get the hang of how to do it properly.
Any good article on writing good software protection are welcome.
Alex Korchemniy
|
|
|
|
|
|
hi all,
I'm currently writing an app with C++ visual studio v6.0
The application follows a few process steps, so the way I'm implementing this application requires me to make the dialog display a short series of forms.
So far, I've created a base dialog with back/next and cancel buttons, and four forms. Now, what I plan on doing, is calling xxx::create() for each form and then controlling their display with the base dialog.
It seems logical enough to me, but this is the first time I've ever done this kind of program, and it's a little disconcerting that I haven't been able to find anything in the way of examples online for creating wizard style programs?
So, does anyone know if I am doing anything particularly stupid here? or better, know of any examples online that step me through an already working example of what I want to do?
|
|
|
|
|
|
Thanks a lot, Christian!
That's a bit more to go on.
searching these sites (and google in general) for various combinations of "wizard" "dialog" and "form" really wasn't throwing up anything I could see as useful!
|
|
|
|
|
Yeah, google is great, but only if the terms you want to search don't apply to 1000 other fields of interest. It's like trying to find code samples that are in C. The letter C is gonna match every site there is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hmmm, just a suggestion: have you looked at the CPropertySheet (see here[^]) ?
You can set it in Wizzard mode. This will be really easy to implement but of course it is rather limited. If you need to have a really standard Wizzard, then I think this is the solution. You will need to remove the dialog creation in the CxxxApp class (in InitInstance) and replace it by the wizzard. I'm sure you will find useful articles on this site.
Hope this helps
|
|
|
|
|
Hi, I've developed a service that runs with Local System Account privileges. The service creates a tray icon, and works fine. When I change the Local System Account with a user account, the icon can't be showed up. Is there any restriction in Windows about this? How can i accomplish this?
Tnx
|
|
|
|
|
Is the user account, the service running in, the same as the currently logged user?
Anyway, I would not recommend to write a service that itself displays a tray icon - there's a lot of problems with such a solution (security among others).
Better idea is to write small .exe running as a normal program, that displays the tray icon and communicates with the service using some sort of (semi)secured communication channel (eg. pipes...)
|
|
|
|
|
jhad wrote:
When I change the Local System Account with a user account, the icon can't be showed up
Actaully Service can Interect with DESKTOP only WHEN it's run in LOCAL SYSTEM ACCOUNT!, thats may be problem!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
SORRY FOR THE REPEAT PLEASE RESPOND TO THIS ONE
Hi guys
I'm still strugling with the problem of reading a huge file in the most efficient way. I was suggested last week to "read the file into memory as one big chunk". I think that the advice refered to reading the data in binary format instead of text. Cool... so first I have to translate my text files into binary and then read them... Problem is that all examples that I've found refer to either read a single number or things such as a struct with phone directory...
How about reading a 2 dimensional array of doubles as text, save it as binary and then load it into another array after reading the binary file???
examples???
Thanks a million.
|
|
|
|
|
Unless the array is always the same size, the first thing you need to do is write the array bounds, so you know what to do with the data when you read it. Then you can read it in, a single number at a time, or a row at a time if you'd like.
Christian Graus - Microsoft MVP - C++
knapak wrote:
SORRY FOR THE REPEAT PLEASE RESPOND TO THIS ONE
OK - please delete the other one...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi guys
I'm still strugling with the problem of reading a huge file in the most efficient way. I was suggested last week to "read the file into memory as one big chunk". I think that the advice refered to reading the data in binary format instead of text. Cool... so first I have to translate my text files into binary and then read them... Problem is that all examples that I've found refer to either read a single number or things such as a struct with phone directory...
How about reading a 2 dimensional array of doubles as text, save it as binary and then load it into another array after reading the binary file???
examples???
Thanks a million.
|
|
|
|
|
Unless the array is always the same size, the first thing you need to do is write the array bounds, so you know what to do with the data when you read it. Then you can read it in, a single number at a time, or a row at a time if you'd like.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
can someone explain a line in the .RC file that accompanies resource definitions in VC++ 6.0?
I have a dialog that has the line:
FONT 8, "MS Sans Serif", 0, 0, 0x1
I also have seen another version of this (seen when merging code changes with another developer) that doesn't have the numerics:
FONT 8, "MS Sans Serif"
curious on this - thanks for explanation.
Johnny
|
|
|
|