|
Hi !
No, a calling convention error is not because the parameters you pass are wrong. A calling convention describe in fact which part will clean the stack after the function has been called: the program which calls the dll or the dll itselfs. VB and C++ uses different calling conventions: for VB it is the standard calling convention (__stdcall) and for C++ it is the the C calling convention.
So, here your HookSystem and UnHookSystem functions have the C calling convention in the dll but VB calls them with it own calling convention. So, you have to change the calling convention of these functions inside your dll: just add a __stdcall :
<br />
int __stdcall HookSystem(int AddressOfCallBackFunction);<br />
int __stdcall UnHookSystem(int HookID);<br />
<br />
int __stdcall HookSystem(int AddressOfCallBackFunction)<br />
{ <br />
....<br />
}<br />
int __stdcall UnHookSystem(int HookID)<br />
{<br />
....<br />
}
You could also use APIENTRY as it is defined as __stdcall
|
|
|
|
|
Hi Cedric : ). Thanks a lot for your answer. That solved the problem!
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Hi everybody,
I'm planning to write a multi platform driver in order to capture
applications on a desktop and send them to FlashComm server.
I know that I may use Camtasia, but I'm planning an open source
project and I would like to implemet my own drivers.
I have to be able to select my screen output if you click on a flash movie and go to properties. There you can select all available cameras from a dropdown menu. My goal is that my screen output can be selected here.
Anyone with solutions
Tom Lismont
|
|
|
|
|
Hey
I'm building this small image processing program using MFC with the Doc/View stuff and i'm annoyed about the 3D border of the frame (or the inlay so to speak) in which the view is placed. I tried to remove that border or whatever it is by adjusting the CREATESTRUCT in the PreCreateWindow function of the child frame which holds my view. That doesn't seem to work. Any ideas/suggestions what it should be or what i did wrong?
thanks and greetings Joris
|
|
|
|
|
try using ModifyStyle().....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
try using ModifyStyle() or ModifyStyleEx......
u can change/modify the window char/styles dynamically(u have border optionz in that if i am right!!!.....search in msdn for WS_EX_STATICEDGE(for modifystylex) or WS_THICKFRAME(for modifyStyle) .....there r many optionz i dunno what kind of frame ,but u ought to find ur type of frame listed in these parameterz(WS_EX_.....,WS_....).....
hope that helpz!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hey
Thanks. I solved it. I removed the WS_EX_CLIENTEDGE in the PreCreateWindow function from both the MDI child frame AND the view. I stumbled on that by accident. Seems to work fine, but i have no clue why the client edge has to be removed from both parts of the framework.
greetings Joris
|
|
|
|
|
i am writting an ActiveX control.
i want change mouse cursor at run time.
i written the following code in OnSetCursor.
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
But OnSetCursor is not called.
how call the OnSetCursor. won't framework call it?
|
|
|
|
|
well.....
u have to override the OnSetCursor function!!!!!
just calling it wont help!!!!!
add the WM_SETCURSOR.....
then in that function..... remove the return statement and replace it with return TRUE;
eg:
bool EXAMPLE::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
....
...
....
return CDialog::OnSetCursor(pWnd, nHitTest, message);
return TRUE;
}
now add the code where u want to add it ......
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
hope that helpz!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I'm creating a property sheet with many property pages but I don't know how to handle the Close button to save my data on the property page . Please help me!
Love
|
|
|
|
|
|
Hello,
I try to compile and get that the sddl.h file is missing.
Is there anyone that have this file and can EMail me that
goran.larsson@neteye.se
|
|
|
|
|
Looks like you may need to install the latest Platform SDK.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ok,
And where can I get that?
|
|
|
|
|
|
hiho@ll
just wanted to know what to do if i have 2 classes
class example1
class example2
to use the class example1 in example2 i use #include "exmple1.h" in the example2.h
but then i want to program a function in example1 which uses example2
if i add #include "example2.h" in example1.h i get a compiler error in example1.h
syntax error: identifier 'example2'
i understand why this error occurs
but how i make a workaround?
thx
|
|
|
|
|
You just forward-declare example 2:
<br />
<br />
class example2;<br />
<br />
class example1<br />
{<br />
public:<br />
....<br />
example2* pex2;<br />
}<br />
but as you can see, you can only use pointers to the forwarded class, not the class itself.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
well u c u have example1 class and example2 class,u cant interrelate themeboth for a simple reason that can be explained by thiz example.....
cansider a case where u have a classes that need each other.....that is example1 object is there in example 2 and vice versa.....
observe.....
class example2
{
example1 ex1;
}b;
class example1
{
example2 ex2;
}a;
letz consider object b.....
note that "b" would contain "ex1" and "ex1" would contain "ex2"....and what is ex2???....logically it goes to infinity(since each instance contains the instance of the other in itself)!!!!!
so it doesnt make sense.....moreover u can only create an object if itz memberz are all defined!!!!!.....say in class example2, the example1 need to be understood by the compliler to allocate /putaside the value for that object,but to get theat done example1 class must be fully defined,u will find it dependz on example2 and hence not possible!!!!!
thiz iz the way i reason it out!!!!!!;)
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
hello
i am working on my final project for graduation.
i have a tv tuner card connected with a wireless camera.
i want the video retrieved by camera to be processed in VC.
the problem is how could i get that video in VC from tv tuner card.
also some attributes to be sent to the camera for its movement.
tell me plz the path and API to be used.
thanx
|
|
|
|
|
Hi everyone.
My problem: I want to determine if a http server accepts bytes ranges. I am using wininet functions, (internetopen->internetconect->httpopenrequest->httpsendrequest->httpqueryinfo). If anyone can suggest me how to do this, or point me to a piece of relevant code (VC++) please help.
THANKZ.
|
|
|
|
|
HI
I am using visual C++ .net. I just created dialog box A under project 1, dialog box B and one edit control box under project 2.
It is possible to display the 'caption' of dialog box A on the edit control box of dialog B? If yes, what codes whould I type ?
Thx
|
|
|
|
|
there is any way to set transperent color ? in SetTextColor.
|
|
|
|
|
Use SetBkMode() to make the background transparent. If you want to make the text partially transparent, you can't, not with the Windows API.
Ryan "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"
|
|
|
|
|
hello,
I tried using this function inside my ISAPI
HWND FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName)
because i need to do some UI update under my ISAPI function. But the return handle is NULL.
I already tried this function in a dialog class and this works fine ...
Do you have any idea on FindWindow function limitation or is this ISAPI limitation?
I really need your help guys ...
Thanks,
jude
|
|
|
|
|
This is because ISAPI DLL is called from a service, which is executed on
non-interactive window station and therefore has no access to the user
desktop.
So is there anyway?
Can anyone help me ???
jude
|
|
|
|