|
But there is only Image to PDF converter
|
|
|
|
|
Hi,
I need to write an injection module for my application.
Which one would be the best. Code Injection or DLL Injection. What are the advantages over the other...
Heard that, DLL injection can be used in all the windows OS. but code injection can be applied only on NT Operating sys.
Is there any other advantages or problems in using either of them..
Please advice me.
Thanks.
~ Selva
|
|
|
|
|
To my mind "DLL injection" is a form of "Code Injection". If the code in question is complex DLL injection is the easiest way to get your code into another process. If you attempt to inject raw code you lose actions the loader performs which we all take for granted such as automatic code relocation; not to mention the fact that compilers build DLL's not "naked" code.
Steve
|
|
|
|
|
Thanks Steve.
I will just go with DLL Injection in that case.
~ Selva
|
|
|
|
|
Hello everyone,
I have designed a SDI application. I have assigned the title for the document using SetTitle() function in AbcDoc.cpp file.
I want to assign the title at runtime (i.e i have provided text box in a dialog). How should i do this?
Please help me.
Thanks in Advance.
|
|
|
|
|
You can follow this root,
((CFrameWnd*)AfxGetMainWnd())->GetActiveDocument()->SetTitle("New");
|
|
|
|
|
Thank You very much. It works..
|
|
|
|
|
Assume I have a DLL with a function void BFunction() . I link this Dll to a program (test.exe ) using its .lib and .h .
If, in the future, i add a new function to the Dll - void AFunction() , will i have to recompile test.exe even if test.exe does not (and will not) use the AFunction() ?
Since the Dll has changed, are the pointers to the functions in the dll are still the same? Or by adding a new function will cause existing programs to crash, and these existing programs must be recompiled as well?
Please help,
Thanks.
|
|
|
|
|
You do not need to recompile test.exe until your new dll exports the function that is being called by test.exe
test.exe is only concerned about the function that it calls. No matter if you add or remove any other functions in the dll.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Does it mean, that i can keep on adding new functions to a dll (and export these functions) or modify the behavior of existing exported functions, and i do not have to recompile existing programs which are already linked to it?
Example
DLL ver1.0 - Functions : void BFunction(), void CFunction();
test.exe (calling BFunction()) is linked using .lib, .h during compile time to this DLL.
DLL ver 2.0 - Added function void AFunction(), and modified internal behavior of BFunction().
test.exe will still work fine? Since the function prototype of BFunction is still the same, test.exe should work fine right?
|
|
|
|
|
1. You are free to add new functions always.
2. You are free to remove existing functions if those functions are not being used by the calling program.
3. You can modify the internal behavior of existing functions that are being used by the calling program, until you keep the return type and function parameters same.
uus831 wrote: Since the function prototype of BFunction is still the same, test.exe should work fine right?
Yes.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Thanks a lot. Now it's clear to me
Really appreciated it.
|
|
|
|
|
If anyone else is using your DLL, it's not advisable to change the functionality of existing functions.
It might be a good idea to create/export classes for each interface version, and only add new functionality to new classes.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
I using the Editbox as the Text editor and i assing the short cut keys in editbox for some operation like find text as Alt +H . How can i use it..
Manikandaprabu
|
|
|
|
|
Have you tried using Keyboard Accelarators?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
How to get the currrent view's bk color. I have used pDC->GetBkColor() in OnDraw() of the form view class but it gave white color.
How can this be done?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: but it gave white color.
How you are determining this ? Show code.
It gives actual color of form.
|
|
|
|
|
This is the code
void CCallLoggerClientView::OnDraw(CDC* pDC)
{
CRect rc;
GetClientRect(&rc);
CString str= "date";
COLORREF clr;
clr = pDC->GetBkColor();
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(DATE_COLOR);
pDC->FillSolidRect(rc.Width()*3/4+9,2,rc.Width()*3/4+50,15,clr);
pDC->TextOut(rc.Width()*3/4+10,2,str);
}
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: pDC->FillSolidRect(rc.Width()*3/4+9,2,rc.Width()*3/4+50,15,clr);
Why you are using this function here. You are filling rect with color , which is already thre.
Even with this call, GetBkColor returns color of form view.
|
|
|
|
|
Actually i am calling the same bunch of lines in a timer function. So the text is getting a whilte background every time.So i did like that.
Is there another way to do this?
KIRAN PINJARLA
|
|
|
|
|
And how you are creating DC there ?
|
|
|
|
|
i used
CClientDC dc(this);
KIRAN PINJARLA
|
|
|
|
|
Use CPaintDC instead.
Additionally, you need to Invalidate the rect before using this. i.e.
void CMyView::OnTimerProc()
{
Invalidate();
CPaintDC(this);
}
|
|
|
|
|
Invalidate() causes flickering in my window.
KIRAN PINJARLA
|
|
|
|
|
OK. I called InvalidateRect() in the rect region in which the text falls. Not it looks ok.
Thank you.
KIRAN PINJARLA
|
|
|
|