troubleshooting Question

ofstream & windows hooks

Avatar of Unimatrix_001
Unimatrix_001Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Development
33 Comments1 Solution447 ViewsLast Modified:
Hi,

I'm trying to use a ofstream object inside a hook that is part of the shared data section, but I'm unable to get it to write with it:

#pragma data_seg(".shared")
HHOOK messageHook=0;
ofstream fileOutput;
#pragma data_seg()

//In the set hook procedure:
fileOutput.open("TEMP.data");

//In the message handler:
fileOutput<<"X"<<endl;


Nothing is outputted to the file though, perhaps somebody could shed some light here for me.

Thanks,
Uni
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 33 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros