Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionZoom Pin
john563219-Aug-10 0:16
john563219-Aug-10 0:16 
QuestionRe: Zoom Pin
CPallini19-Aug-10 0:24
mveCPallini19-Aug-10 0:24 
AnswerRe: Zoom Pin
john563219-Aug-10 1:30
john563219-Aug-10 1:30 
GeneralRe: Zoom Pin
CPallini19-Aug-10 1:59
mveCPallini19-Aug-10 1:59 
GeneralRe: Zoom Pin
john563219-Aug-10 2:17
john563219-Aug-10 2:17 
GeneralRe: Zoom Pin
CPallini19-Aug-10 2:30
mveCPallini19-Aug-10 2:30 
AnswerRe: Zoom Pin
Luc Pattyn19-Aug-10 2:35
sitebuilderLuc Pattyn19-Aug-10 2:35 
QuestionProblem caused by interception of API function using method 'code injection' Pin
VictorSotnikov18-Aug-10 23:55
VictorSotnikov18-Aug-10 23:55 
I have an application written on MS Visual C++ 6. In one of mu customers (WinXP Japanese) the application fails right after start. After studying crash dump i saw the following:

My app in its InitInstance intercepts several user32.dll functions: GetSysColor, GetSysColorBrush, DrawFrameControl. I needed this to implement my own skinning. The interception is performed by widely used 'code injection' method: I locate necessary function in loaded user32.dll and write into its begin byte 0xe9 (command 'jump near'), then 4 bytes - relative address of my intercept function. Before this operation I suspend all threads of my application.

This worked fine on lot of customer's PCs. But on one PC the application fails right after this intercept is done - after this myapp calls LoadString, and I get Access Violation. Call Stack is:
user32.dll!__LockResource@8()
user32.dll!_LoadStringOrError@20()
user32.dll!_LoadStringW@16()
mfc42u.dll!AfxLoadString()
mfc42u.dll!CString::LoadStringW()
<my code that calls CString::LoadStringW>

It turned out - this customer has installed a software named Humming Heads Security Platform (http://www.hummingheads.co.jp/). This is a security monitor that controls many aspects of every application's work. From the crash dump I see: several DLLs of this Humming Heads Security Platform are embedded into my process. My version is: it intercepts API functions too, and this lead to conflict with my interception (somehow). If I turn this interception off in my application, it does not fail. What can you say about:
what exactly happened?
what can I do?
will it help if I will do the API functions interception using other method known as 'Modification of import/export tables'?
GeneralRe: Problem caused by interception of API function using method 'code injection' Pin
David Crow19-Aug-10 3:51
David Crow19-Aug-10 3:51 
QuestionProblem with doublebyte chars in Japanese Pin
narayanagvs18-Aug-10 21:13
narayanagvs18-Aug-10 21:13 
AnswerRe: Problem with doublebyte chars in Japanese Pin
norish19-Aug-10 8:03
norish19-Aug-10 8:03 
GeneralRe: Problem with doublebyte chars in Japanese Pin
narayanagvs20-Aug-10 0:35
narayanagvs20-Aug-10 0:35 
QuestionHelp needed in Solving LNK2001 Pin
Hari_1618-Aug-10 21:03
Hari_1618-Aug-10 21:03 
AnswerRe: Help needed in Solving LNK2001 Pin
bleedingfingers18-Aug-10 21:07
bleedingfingers18-Aug-10 21:07 
GeneralRe: Help needed in Solving LNK2001 Pin
Hari_1618-Aug-10 21:19
Hari_1618-Aug-10 21:19 
GeneralRe: Help needed in Solving LNK2001 Pin
Richard MacCutchan18-Aug-10 21:54
mveRichard MacCutchan18-Aug-10 21:54 
GeneralRe: Help needed in Solving LNK2001 Pin
bleedingfingers18-Aug-10 22:07
bleedingfingers18-Aug-10 22:07 
GeneralRe: Help needed in Solving LNK2001 Pin
Richard MacCutchan18-Aug-10 22:19
mveRichard MacCutchan18-Aug-10 22:19 
GeneralRe: Help needed in Solving LNK2001 Pin
bleedingfingers18-Aug-10 22:25
bleedingfingers18-Aug-10 22:25 
AnswerRe: Help needed in Solving LNK2001 Pin
Cedric Moonen18-Aug-10 21:50
Cedric Moonen18-Aug-10 21:50 
AnswerRe: Help needed in Solving LNK2001 Pin
Richard MacCutchan18-Aug-10 21:54
mveRichard MacCutchan18-Aug-10 21:54 
QuestionHow to safely release the memory when I dynamic create the the dialog ? Pin
wangningyu18-Aug-10 20:50
wangningyu18-Aug-10 20:50 
AnswerRe: How to safely release the memory when I dynamic create the the dialog ? Pin
Eugen Podsypalnikov18-Aug-10 21:08
Eugen Podsypalnikov18-Aug-10 21:08 
AnswerRe: How to safely release the memory when I dynamic create the the dialog ? Pin
Niklas L18-Aug-10 22:37
Niklas L18-Aug-10 22:37 
GeneralRe: How to safely release the memory when I dynamic create the the dialog ? [modified] Pin
Aescleal18-Aug-10 22:44
Aescleal18-Aug-10 22:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.