×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to import a native (non COM ) DLL into VC++ (or VB through API)

How to import a native (non COM ) DLL into VC++ (or VB through API)

How to import a native (non COM ) DLL into VC++ (or VB through API)

(OP)
I have downloaded the 32bit DLL for UnACE (compression software), comes with extremely limited documentation ( only a Delphi example) and a comment "I cant tell you how to link the file since there are so many programming platforms out there"

the package includes
 -Unace.h
 -Unace.dll
 -Unace.def

the header reads as:


#define ACEERR_MEM      1
#define ACEERR_FILES    2
#define ACEERR_FOUND    3
#define ACEERR_FULL     4
#define ACEERR_OPEN     5
#define ACEERR_READ     6
#define ACEERR_WRITE    7
#define ACEERR_CLINE    8
#define ACEERR_CRC      9
#define ACEERR_OTHER   10
#define ACEERR_EXISTS  11
#define ACEERR_END      128
#define ACEERR_HANDLE   129
#define ACEERR_CONSTANT 130
#define ACEERR_NOPASSW  131
#define ACEERR_METHOD   132
#define ACEERR_USER   255

#define ACEOPEN_LIST    0
#define ACEOPEN_EXTRACT 1

#define ACECMD_SKIP     0
#define ACECMD_TEST     1
#define ACECMD_EXTRACT  2

#define ACEVOL_REQUEST  0
#define ACEVOL_OPENED   1


#define ACESEL_YES      0
#define ACESEL_ALWAYS   1
#define ACESEL_NO       2
#define ACESEL_CANCEL   3

#define ACECMT_OK       0
#define ACECMT_SMALLBUF 1
#define ACECMT_NONE   255

#pragma pack(1)          // structures are byte-aligned!!

struct ACEHeaderData
{
  char ArcName[260];
  char FileName[260];
  UINT Flags;
  UINT PackSize;
  UINT UnpSize;
  UINT FileCRC;
  UINT FileTime;
  UINT Method;
  UINT QUAL;
  UINT FileAttr;
  char *CmtBuf;
  UINT CmtBufSize;
  UINT CmtSize;
  UINT CmtState;
};

struct ACEOpenArchiveData
{
  char *ArcName;
  UINT OpenMode;
  UINT OpenResult;
  UINT Flags;
  UINT Host;
  char AV[51];
  char *CmtBuf;
  UINT CmtBufSize;
  UINT CmtSize;
  UINT CmtState;
  int PASCAL (*ChangeVolProc)(char *ArcName,int Mode);
  int PASCAL (*ProcessDataProc)(unsigned char *Addr,int Size);
};

#pragma pack()

HANDLE __stdcall ACEOpenArchive(struct ACEOpenArchiveData *ArchiveData);
int __stdcall ACECloseArchive(HANDLE hArcData);
int __stdcall ACEReadHeader(HANDLE hArcData,struct ACEHeaderData *HeaderData);
int __stdcall ACEProcessFile(HANDLE hArcData,int Operation,char *DestPath);
int __stdcall ACESetPassword(HANDLE hArcData,char *Password);


I figure that if I at least know the contants, function names and parameters, this may help me figure out how to link the native dynamic link file, anyone have a Clue? (also if you know how to do so in VB would be helpful as well)


Karl
kb244@kb244.8m.com

Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML, ASP(somewhat), QBasic(least i didnt start with COBOL)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close