🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11038

Re: DLL Howto...

#11038
From: Babak
Date: Sat, 28 Feb 2004 09:37
71 lines
2933 bytes
Great !!!! Thanks so much @};-


Ed Mulroy [TeamB] wrote in message <4040f03c$1@newsgroups.borland.com>...
>--------------------------
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>type hihello.cpp
>#include <windows.h>
>
>BOOL WINAPI DllEntryPoint(HINSTANCE, DWORD, LPVOID)
>  {
>  return TRUE;
>  }
>
>extern "C" __declspec(dllexport) void Hi(void)
>  {
>  MessageBox(HWND_DESKTOP, "Hi", "HiHello.DLL", MB_OK);
>  }
>
>extern "C" __declspec(dllexport) void Hello(void)
>  {
>  MessageBox(HWND_DESKTOP, "Hello", "HiHello.DLL", MB_OK);
>  }
>
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>type mainprog.cpp
>#include <windows.h>
>
>extern "C" __declspec(dllimport) void Hi(void);
>extern "C" __declspec(dllimport) void Hello(void);
>
>int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
>  {
>  Hi();
>  Hello();
>  return 0;
>  }
>
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>bcc32 -WD hihello
>Borland C++ 5.6.5 for Win32 Copyright (c) 1993, 2002 Borland
>HIHELLO.CPP:
>Turbo Incremental Link 5.64 Copyright (c) 1997-2002 Borland
>
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>implib -c hihello.LIB  hihello.DLL
>
>Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation
>
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>bcc32 -W mainprog hihello.lib
>Borland C++ 5.6.5 for Win32 Copyright (c) 1993, 2002 Borland
>MAINPROG.CPP:
>Turbo Incremental Link 5.64 Copyright (c) 1997-2002 Borland
>
>C:\Documents and Settings\Administrator\My Documents\Lookat\q010
>>
>--------------------------
>
>.  Ed
>
>> Babak wrote in message
>> news:4040eb2a@newsgroups.borland.com...
>>
>> I want to have two function in a DLL
>> one show a message with "hello"
>> and another the same , show message with "hi"
>> Compile it and then a program that call the DLL and
>> can use those functions
>
>
Technical Details
Message-ID: <40426aba@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!t-online.de!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4040eb2a@newsgroups.borland.com> <4040f03c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,95faf01013e76bb4
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-29 15:02:18 PST
From: "Babak" <babak_info@hot.pop>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4040eb2a@newsgroups.borland.com> <4040f03c$1@newsgroups.borland.com>
Subject: Re: DLL Howto...
Date: Sat, 28 Feb 2004 13:07:40 +0330
Lines: 73
X-Newsreader: Microsoft Outlook Express 4.72.3110.37
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.37
NNTP-Posting-Host: 217.219.63.229
Message-ID: <40426aba@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1078094522 217.219.63.229 (29 Feb 2004 14:42:02 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!t-online.de!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail