May 15, 2024, 11:10:04 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Question about 'DECLARE'

Started by billhsln, November 18, 2011, 10:17:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

I have seen lots of DECLARE statements and in some cases, the same definition with a slightly different way of being declared.  I was wondering how they need to be declared.

DECLARE ADVAPI32.DLL
DECLARE EXTERN
DECLARE IMPORT
DECLARE GDI32.DLL
DECLARE KERNEL32
DECLARE KERNEL32.DLL
DECLARE OLE32.DLL
DECLARE SHELL32.DLL
DECLARE SHLWAPI.DLL
DECLARE USER32.DLL
DECLARE WININET.DLL
DECLARE WINMM.DLL

Can we just do: DECLARE IMPORT for most of those as DLLs?  Since I have seen many of those with DLL's, also being defined as just DECLARE IMPORT, which of the DLL's do not need to be used or can default as IMPORT?

KERNEL32.DLL, OLE32.DLL, GDI32.DLL, and USER32.DLL are some times just IMPORT.

Right now I have a list of 356 DECLARE's, but I have a bunch that are duplicates, which is why I want to know if I need the DLL versions or not.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

That's why I always use the following in all my files:

$include "windowssdk.inc"

For the most part I don'thave to worry about api function declares

I had to search to find if I had declared any dlls anywhere.  I found some in some old ebasic code.


I have no idea how to give you a technically correct answer. 

Maybe someone else can.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

aurelCB

Yes this is sometimes annoying.
When i want something in Oxygen i use winh.inc which include most API functions
what i need.
So one of options will be create your own include file whith functions you
use most of time or like Larry says windows.inc or Sapero windows.ssdk.
Im not sure maby is possible add functions to static lib or like you say
create .dll .