|
CMainDlg::OnWriteImgFile()
{
m_scsi.WriteCD2ImgFile(GetSafeHwnd(), m_fileName, m_cHost, m_cID, m_cLun);
}
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Hi,
Thanks for you all!
It finally worked. The best choice may be:
AfxGetMainWnd()->GetSafeHwnd();
Thanks again,
chen
|
|
|
|
|
To see if we are on the same track,
You have a dialog class and you wish you use a function from the parent class of the dialog?
One solution would be is to pass the parent within the constructor of the dialog class.
Menus
eg)
CMenu mnu;
HMENU hmnu = pWnd->GetMenu( );
mnu.Attach( hmnu );
// Now you can manipulate the window's menu as a CMenu
// object...
|
|
|
|
|
Is there a way to save information between function calls when using load library? I can always use a file on the drive, or redefine my function params, just curious.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
a global variable in a DLL will persist until your app releases the DLL.
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
That would be a prob as I release the dll every time I call the function. It is a plugin. Is that the only way?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Darroll wrote:
Is that the only way?
maybe not the only way, but it's the obvious way
for plugins, i always write the data to a file somewhere (or the registry, depending on my mood).
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
My next thought is how to know when the app starts as to not save data between sessions. I may have to have the app set a running flag in the registry or something. If there is an easier way then this. Any clues?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
you could use a mutex, but a reg key might be just as easy.
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
Hello there,
Please introduce to me a good MPEG library for playing MPEG movies ...
I don't want to use MCI for playing MPEG movies ...
Please help me ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
If you want reusable source code, I would suggest Virtual Dub.
If you just need a run-time and an SDK, you of course have DirectShow, part of DirectX. But this run-time does not play frame-accurate MPEG videos, which is a disgrace.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Hello Stephane,
Thanks for reply ...
I downloaded Virtual Dub source code, but it's hard to understanding
Can you tell me Quick help about using of that for playing MPEGs ?
Or can you introduce to me other engine ?
Thanks in advance
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
be aware that MPEG is encumbered by many patents. it's probably impossible to get a decent player that doesn't infringe on someone's patent.
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
My SDI application prints graphs of data. It uses A4- Landscape mode. When I run this app in Windows2000 I get color output on printer. When I run this app on Windows XP, I do not any prints. If I do following things I get output.
1. Change all colors to black. OR
2. Change paper size e.g. to Letter size.
|
|
|
|
|
I think it's more likely to be a printer driver problem than anything else.
Try:
Check you're using the correct driver
Update the printer driver
Try a different type of printer
Drink more red wine (preferably Italian).
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Thanks. It worked. I tried another printer.
|
|
|
|
|
Howdy,
I have a stored procedure in MS SQL Server 2000 which performs some inserts and then a select statement. If the inserts fail (for example violating primary key contraints) i still would like to retrieve the results of the select statement. To illustrate this:
insert into table values (1)
insert into table values (1) /*violates primary key*/
insert into table values (2)
Select stuff from table
executing this in the query manager i get an error message about the failed insert and a grid for the select statement.
Using OLE DB, The Execute() method fails with DB_E_INTEGRITYVIOLATION and no result set is returned! Is there anyway to either suppress the error information generated by SQL Server so that the client is never informed of the failed insert, OR is there anyway to get OLE DB to give me the result set?
I have simplified the problem a lot so it might seem like I'm trying to do something senseless. Essentially I attempt a bunch of actions and the select at the end returns a bunch of error information.
Any assistance would be greatly appreciated!
~Alex Deem
|
|
|
|
|
Many debuggers can hook to a program and read its memory. Even if it's protected/private. I'm thinking about writing a simple debugging tool, but I don't know how to read process memory.
Should I use SetWindowsHookEx ?
Some advice would be greatly appriciated
Regards,
Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
Try ReadProcessMemory()
Dave
|
|
|
|
|
I've been doing a fair amount of work on something pretty similar, I've been interested in debuggers and how programs work at the lowest levels for a while now after starting off as a bit of a coding idiot
The best places I can recommend to start is if you can afford it, buy John Robbin's "Debugging Windows Applications" because he truely is the king of all things debugger. His Bugslayer articles in MSDN give good ideas too and there are a couple of articles here on CP that can help, search for APIHijack because that gives a good idea of how to get started. John Robbins really is the king though, just had to say that again
|
|
|
|
|
Thanks carrie
The book looks promissing, but it's 45 bucks on amazon
APIHijack's nice, I'll check out its sourcecode.
Kind regards,
Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
Thanks for the suggestion, but this is what I read on MSDN
ReadProcessMemory copies the data in the specified
address range from the address space of the specified process into
the specified buffer of the current process. Any process that has a
handle with PROCESS_VM_READ access can call the function. The process
whose address space is read is typically, but not necessarily, being
debugged.
The entire area to be read must be accessible. If it is not, the
function fails as noted previously.
Regular processes don't have PROCESS_VM_READ...
I doubt windows has a simple api that allows one process to read and
modify the memory of another one. (What would be the use of Protected memory then?)
Or is there a way to make ReadProcessMemory work?
Kind regards,
Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
easy way out:
u gotta Create the process u wanna read urself, then open it using PROCESS_ALL_ACCESS, than read the memory
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
exactly like that, if you use CreateProcess and supply the flag to show that the program you're writing is debugging the one you are wanting to debug, you can get access to read into its memory space.
Just forked out for that book myself about a month ago, its full of amazing code so I'm more than happy to have paid so much for it. Can't live without it now
|
|
|
|