|
The REGS union is for old DOS programs. Newer 32-bit compilers do not support it. You'll need Visual C++ v1.52c for this.
|
|
|
|
|
Well the main reason I wanted to call BIOS was so I can control the X and Y position inside text mode. (0x02). Is there any other way I can do this without calling BIOS?
|
|
|
|
|
Try SetConsoleCursorPosition().
|
|
|
|
|
I am accessing MYSQL database in my program. I perform add , delete, edit, read and display operations on the database. The changes made should be reflected on other machine if same program is running . Pl tell me the way to achieve this.
|
|
|
|
|
The "other" machine would have to requery the database to realize the changes.
|
|
|
|
|
I've run into a strange problem. I'm trying to replace the view for one of my documents (similar to in MS PowerPoint for having different views of the same document), but whenever I call DestroyWindow() on the view, it goes into an infinite loop. Stepping through with the debugger, I found that Windows is constantly sending three of the view's child windows the WM_GETDLGCODE message (it's a CFormView derived class), but only the ones that I created at runtime in the view's OnCreate() handler. Handling the WM_GETDLGCODE message did not stop the messages being sent.
Is this an issue with form views - do they not work correctly with dynamic controls? Or is there something else that could cause this?
Any suggestions are welcome
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
Disregard this. The error is not with the controls. It's somewhere else, but I don't know where
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
Are you calling DestroyWindow on the dynamically created children before the call to DestroyWindow on their parent?
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
No, in the view's OnDestroy() handler, which at the moment is not getting called.
I've managed to track it down a bit so it sometimes works, depending on which window has the focus at the time, and even then it sometimes works if the frame has the focus, and sometimes doesn't. I think a bit more detective work is needed.
Thanks anyway
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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've fixed the problem but I think I've only stopped the symptoms, not the actual problem. The message sequence being sent was: WM_PARENTNOTIFY to the frame window, WM_SHOWWINDOW to the view (to say it's being hidden). The default handler for WM_SHOWWINDOW was sending all the WM_GETDLGCODE messages to the child windows. All I did was overrode OnShowWindow() and did not call the default. It works perfectly.
I have no idea why the default handler for WM_SHOWWINDOW would send all the messages, and why it was sending them continuously (not just once per window), but at least it works, even if it is a bit of a kludge
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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'm current trying to develop a program which can control multiple instances of another program unattended. Simple windows messages won't suffice so I have gone down the track of code injection.
When I have previously used this method it has been straight foreward and i've found it possible to intercept any function I wish. With this program however, the target is written in delphi, I am specifically trying to intercept all of the menu command, especially TrackPopupMenu. Looking in the import table, the program imports them, and when looking through the disassembled code, it actually calls the function, however injection fails to intercept them.
I can hex it into the program to call a function contained within the dll, but this isnt the ideal way, since it wouldn't work if either of the files are changed, injection is a more generic way of doing it.
Is there any easy solution to this dilemma? Is it possible that the program has some protection which prevents the poisioning of its IAT? Or is it simply that Delphie doesn't work in the same way as a similar program in C.. :/
Any help appreciated
|
|
|
|
|
I want to learn the basics of NT service. For this purpose i am in search of good and easy tutorial for a beginner. I found tons of tutorials on NT service here at CP, MSDN and other sites. But i am in search of a single good tutorial. Can anyone suggest me the best one in his opinion ?
|
|
|
|
|
For help on this site, if you want to write your own NT service, look at PJ Naughter's framework[^] or Nish's article[^].
The question is, what do you want to do with a NT service? It is not easy to figure out how to write a useful NT service. If all you want is make your program running without logon to the box, then my tool[^] may help you.
Good luck.
|
|
|
|
|
Dear All,
i am developing an application in VC++. i want my application to be notified when any user logs in or
logs out from the system. is their any way to do this
please help me.
thanks.
lodhi
|
|
|
|
|
yes, buit you'll need to create a GINA.DLL in order to handle that, the login is handled by that DLL in order to make harder to attack/steal user accounts, its a security thing...
hope this helps.
|
|
|
|
|
yes , you can do this by GINA dll , you can make your GINA that will have the resorce handle of ur application and you can log it..see MSDN for details
great topic.
|
|
|
|
|
use ExtractApppath function to get the
Path of .Exe
CString ExtractAppPath()
{
CString path_buffer;
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
path_buffer = GetAppPath();
_splitpath( path_buffer,drive, dir, fname, ext );
CString AppFilepath = drive;
AppFilepath += dir;
return AppFilepath;
}
CString GetAppPath()
{
char Buffer[_MAX_PATH];
GetModuleFileName(0, Buffer, sizeof(Buffer));
return Buffer;
}
Regards,
Uma Mahes
|
|
|
|
|
GetCommandLine() and parse the CString.
~RaGE();
|
|
|
|
|
In addition to using the GetCommandLine() approach, GetModuleFileName() / GetModuleFileNameEx() are neat functions that one may use to find the path of the executing program, which avoids the need to split the path.
MA
|
|
|
|
|
Can we use Symantech C++ compiler version 7.5 on Windows 2000. I installed it on windows 2000 machine and not able to compile any thing. Any help is greatly appreciated.
thanks
Sri
|
|
|
|
|
Sriramulu wrote:
...not able to compile any thing.
This is fairly vague. Does the compiler not work at all, or just with a particular project? Are there errors in the code that you are compiling?
|
|
|
|
|
Hi,
I've used reverse engineer to create UML in VISIO.
now in VISIO is there any functionality for creating automatic flow chart and flow diagram of my project?
Thank u in advance.
|
|
|
|
|
What is the effective way to find the uptime of an application? I have a server application and i want to ask the server its uptime. For this purpose i need to record the time when application starts and then subtract the current time from initial time to get the difference. I want this difference in the format "dd:hh:min:sec", how can i do so ?
|
|
|
|
|
You can get current time using W32API function GetLocalTime(LPSYSTEMTIME);
|
|
|
|
|
just an idea ..not sure whether right or wrong...what about gettickcount()
|
|
|
|