Real Software Forums
http://forums.realsoftware.com/

Calling Windows Function
http://forums.realsoftware.com/viewtopic.php?f=6&t=43324
Page 1 of 1

Author:  mekel [ Sat Mar 24, 2012 10:47 pm ]
Post subject:  Calling Windows Function

How to call a External DLL function from Real Basic

For eg) This is the function provided in the forum

#if TargetWin32 Then
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Int32, ByVal nIndex As Int32, ByVal dwNewLong As Int32) As Int32
Const GWL_EXSTYLE = -20
Const WS_EX_TOOLWINDOW = &H80
Call SetWindowLong(Self.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW)
#endif


It will be good if someone can explain this and please let me know the related documentation pages

Author:  charonn0 [ Sat Mar 24, 2012 11:02 pm ]
Post subject:  Re: Calling Windows Function

The documentation entry on the Declare statement ought to prove enlightening.

Author:  mekel [ Sat Mar 24, 2012 11:39 pm ]
Post subject:  Re: Calling Windows Function

Thanks !

Have anyone tried calling libs in 64 bit windows?

Author:  timhare [ Sun Mar 25, 2012 12:18 am ]
Post subject:  Re: Calling Windows Function

As long as the dll is 32-bit, there shouldn't be a problem. All the Win32 API calls work.

Author:  Nevercom [ Tue Mar 27, 2012 4:07 pm ]
Post subject:  Re: Calling Windows Function

If you wanna use Win32 API in your projects, this might help you : http://allapi.mentalis.org/agnet/apiguide.shtml

Author:  npalardy [ Tue Mar 27, 2012 4:36 pm ]
Post subject:  Re: Calling Windows Function

Personally I'd grab the WFS from the ARBP ( http://arbpmembers.org/ )
And I think even a free membership allows you to download code
Grab the WFS (Windows Functionality Suite) and if it does not already have the call you're looking for it will serve as a model of how to call things in Windows

Author:  bob_barr [ Tue Mar 27, 2012 4:46 pm ]
Post subject:  Re: Calling Windows Function

Nevercom wrote:
If you wanna use Win32 API in your projects, this might help you : http://allapi.mentalis.org/agnet/apiguide.shtml

That site has a "goodbye" post dated from 2002. I have to wonder how much the information on it might have changed. Are there any similar sites that are currently active you know of?

Author:  Nevercom [ Tue Mar 27, 2012 5:21 pm ]
Post subject:  Re: Calling Windows Function

Well, WinAPI is not something that being updated every month !
Maybe couple of new APIs been introduced in Vista\7 (Like DWM API), but most of those API calls (If not all) still work.

and of course MSDN is the best reference for Windows Programming.

Author:  Nevercom [ Tue Mar 27, 2012 5:24 pm ]
Post subject:  Re: Calling Windows Function

npalardy wrote:
Personally I'd grab the WFS from the ARBP ( http://arbpmembers.org/ )
And I think even a free membership allows you to download code
Grab the WFS (Windows Functionality Suite) and if it does not already have the call you're looking for it will serve as a model of how to call things in Windows

Isn't WFS 2.5 that is included in RS 2011 the latest ?

Author:  mekel [ Tue Mar 27, 2012 11:07 pm ]
Post subject:  Re: Calling Windows Function

Thanks All. Will try it & update asap

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/