delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/28/10:51:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <002501c24ea2$79a52610$46ca09c0@aniraj>
Reply-To: "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net>
From: "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net>
To: "cygwin" <cygwin AT cygwin DOT com>
Subject: Re: Inclusion of windows dll into cygwin code
Date: Wed, 28 Aug 2002 20:22:05 +0530
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS perl-11
Note-from-DJ: This may be spam

------=_NextPart_000_0023_01C24ED0.934CC040
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: base64

SGkgQWxsLA0KDQpMZXQgbWUgZXhwbGFpbiB0aGUgcHJvYmxlbS4NCg0KSSBoYXZlIGEgY29tcGls
ZWQgYSBkbGwgaW50byB3aW5kb3dzIGVudmlyb25tZW50IHVzaW5nIFZDKysgY29tcGlsZXIuIEkg
aGF2ZSB3cml0dGVuIG15IG1haW4gZnVuY3Rpb24gaW4gYyB3aGljaCBzaG91bGQgdXNlIHRoaXMg
ZGxsLiBJIHdvdWxkIGxpa2UgdG8gY29tcGlsZSB0aGUgY29kZSB1c2luZyBnY2MuIEkgaGF2ZSB0
cmllZCB0byB1c2UgdGhlIGV4cG9ydCBkbGwgY29uY2VwdCBleHBsYWluZWQgaW4gY3lnd2luIHVz
ZXIgZ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gdG8gZ2V0IHRoaW5n
cyBzdGFydGVkLg0KPiANCj4gDQo+IExhcnJ5IEhhbGwgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBsaGFsbEByZmsuY29tDQo+IFJGSyBQYXJ0bmVycywgSW5jLiAgICAgICAgICAgICAgICAg
ICAgICBodHRwOi8vd3d3LnJmay5jb20NCj4gODM4IFdhc2hpbmd0b24gU3RyZWV0ICAgICAgICAg
ICAgICAgICAgICg1MDgpIDg5My05Nzc5IC0gUkZLIE9mZmljZQ0KPiBIb2xsaXN0b24sIE1BIDAx
NzQ2ICAgICAgICAgICAgICAgICAgICAgKDUwOCkgODkzLTk4ODkgLSANCg==

------=_NextPart_000_0023_01C24ED0.934CC040
Content-Type: message/rfc822;
	name="DLL Linking Problem.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="DLL Linking Problem.eml"

Return-Path: <cygwin-return-56995-niraja=npi DOT stpn DOT soft DOT net AT cygwin DOT com>
Received: (from root AT localhost)
	by comet.npi.stpn.soft.net (8.9.3/8.9.3) id NAA32310
	for niraja AT npi DOT stpn DOT soft DOT net; Tue, 27 Aug 2002 13:51:08 +0530
Received: from sources.redhat.com (sources.redhat.com [209.249.29.67])
	by comet.npi.stpn.soft.net (8.9.3/8.9.3) with SMTP id NAA31882
	for <niraja AT npi DOT stpn DOT soft DOT net>; Tue, 27 Aug 2002 13:47:43 +0530
Received: (qmail 14774 invoked by alias); 27 Aug 2002 08:24:11 -0000
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-niraja=npi DOT stpn DOT soft DOT net AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Received: (qmail 14764 invoked from network); 27 Aug 2002 08:24:08 -0000
Received: from unknown (HELO comet.npi.stpn.soft.net) (203.190.139.231)
  by sources.redhat.com with SMTP; 27 Aug 2002 08:24:08 -0000
Received: (from root AT localhost)
	by comet.npi.stpn.soft.net (8.9.3/8.9.3) id NAA31738
	for cygwin AT cygwin DOT com; Tue, 27 Aug 2002 13:46:44 +0530
Received: from aniraj ([192.9.202.70])
	by comet.npi.stpn.soft.net (8.9.3/8.9.3) with SMTP id NAA31727
	for <cygwin AT cygwin DOT com>; Tue, 27 Aug 2002 13:46:43 +0530
Message-ID: <001a01c24da3$35aec790$46ca09c0 AT aniraj>
Reply-To: "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net>
From: "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net>
To: "cygwin" <cygwin AT cygwin DOT com>
Subject: DLL Linking Problem
Date: Tue, 27 Aug 2002 13:54:48 +0530
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0018_01C24DD1.4F09EF70"
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by AMaViS perl-11
Status:   

------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: base64

SGkgQWxsLA0KDQpJIGhhdmUgd3JpdHRlbiBhIHNpbXBsZSBkbGwgdXNpbmcgVkMrKyBjb21waWxl
ciBhbmQgbm93IGkgYW0gdHJ5aW5nIHRvIGxpbmsgdGhlIHNhbWUgdG8gbXkgY29kZSBydW5uaW5n
IGluIGN5Z3dpbiBlbnZpcm9ubWVudC4NCg0KSSBoYXZlIGNyZWF0ZWQgYSBkZWZpbml0aW9uIGZp
bGUgYW5kIHVzaW5nIGRsbHRvb2wgaSBoYXZlIGdlbmVyYXRlZCAuYSBmaWxlLiANCkkgd2FzIGFi
bGUgdG8gY29tcGlsZSBhbmQgbGluayBwcm9ncmFtIHN1Y2Nlc3NmdWxseSBidXQgaSBhbSBmYWNp
bmcgb25lIHByb2JsZW0gd2hlbiBpIGFtIHRyeWluZyB0byBydW4gdGhlIHByb2dyYW0uIGl0IGlz
IHNheWluZyB0aGF0IGVudHJ5IHBvaW50IGZvciB0aGUgZnVudGlvbiBpcyBub3QgZGVmaW5lZCBp
biB0aGUgZGxsLg0KDQpOb3RlIDpUaGUgZGxsIGZpbGUsIGRlZiBmaWxlIGFuZCBzYW1wbGUgcHJv
Z3JhbSB1c2luZyBkbGwgaXMgYWxzbyBhdHRhY2hlZC4NCg0KUGxlYXNlIGhlbHAgbWUgaW4gdGhp
cyByZWdhcmQuDQoNClRoYW5rcyBhbmQgYmVzdCByZWdhcmRzLA0KTmlyYWogQWdhcndhbA0KU2Vu
aW9yIE1lbWJlciBUZWNobmljYWwgU3RhZmYNCk5ldHdvcmsgUHJvZ3JhbXMoSSkgTHRkLg0KTm9p
ZGENCg0KDQoNCg==

------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: application/octet-stream;
	name="TestDll.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="TestDll.cpp"

// TestDll.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "TestDll.h"
#include <stdio.h>

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
    switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
		case DLL_THREAD_ATTACH:
		case DLL_THREAD_DETACH:
		case DLL_PROCESS_DETACH:
			break;
    }
    return TRUE;
}


// This is an example of an exported variable
//TESTDLL_API int nTestDll=0;

// This is an example of an exported function.
TESTDLL_API  printVal()
{
	printf("Hello World");
	//return 42;
}

// This is the constructor of a class that has been exported.
// see TestDll.h for the class definition
CTestDll::CTestDll()
{ 
	return; 
}


------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: application/octet-stream;
	name="TestDll.h"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="TestDll.h"


// The following ifdef block is the standard way of creating macros =
which make exporting=20
// from a DLL simpler. All files within this DLL are compiled with the =
TESTDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined =
on any project
// that uses this DLL. This way any other project whose source files =
include this file see=20
// TESTDLL_API functions as being imported from a DLL, wheras this DLL =
sees symbols
// defined with this macro as being exported.
#ifdef TESTDLL_EXPORTS
#define TESTDLL_API __declspec(dllexport)
#else
#define TESTDLL_API __declspec(dllimport)
#endif

// This class is exported from the TestDll.dll
class TESTDLL_API CTestDll {
public:
	CTestDll(void);
	// TODO: add your methods here.
};

//extern TESTDLL_API int nTestDll;

TESTDLL_API  printVal();


------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: application/octet-stream;
	name="TestDll.def"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="TestDll.def"

LIBRARY TestDll.dll=0A=
EXPORTS=0A=
printVal=0A=

------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: application/octet-stream;
	name="TestMain.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="TestMain.c"

extern printVal();=0A=
=0A=
main()=0A=
{=0A=
printVal();=0A=
}=0A=


------=_NextPart_000_0018_01C24DD1.4F09EF70
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------=_NextPart_000_0018_01C24DD1.4F09EF70--

------=_NextPart_000_0023_01C24ED0.934CC040
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------=_NextPart_000_0023_01C24ED0.934CC040--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019