• Welcome to Valhalla Legends Archive.
 

stupid question about dlls....

Started by brew, June 01, 2007, 07:03 PM

Previous topic - Next topic

l2k-Shadow

Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

I've tried using a definition file at least 3 times before, and they just plain don't work. Am I doing something wrong? And I know the linker is recognizing them. I've gotten some errors with it apparently interfering with the __stdcall
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

MyndFyre

Quote from: UserLoser on June 02, 2007, 12:40 PM
Ugh, add a definition file.

http://www.digitalmars.com/ctg/ctgDefFiles.html#exports

According to Microsoft, a .def file shouldn't be necessary if you use __declspec(dllexport).
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

xp

Quote from: brew on June 01, 2007, 09:37 PM
sure. http://zenixstudios.com/f.php?f=xjskjkpo


Private Declare Function asdfness Lib "dlltest" (asdf As Integer) As Integer
Private Sub Form_Load()
Dim asdf As Integer
asdf = 5
asdf = asdfness(asdf)
MsgBox asdf
End Sub

extern "C" {
int __declspec(dllexport) asdfness(int asdf) {
int lolz = 0;
lolz = asdf + 3000;
return lolz;
}
}



Coincidentally, the Visual Basic Integer and the C int type are two very different things.

l2k-Shadow

yes, int in C is a 32bit integer, it's a 16bit integer in VB.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

MyndFyre

Quote from: l2k-Shadow on June 03, 2007, 10:07 PM
yes, int in C is a 32bit integer, it's a 16bit integer in VB.

C does not define a standard size for int.  Most compilers implement as a 32-bit value.  However, some may implement it as 16.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

brew

Then what's a long (by default) ?
I'm using Visual C++....
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

l2k-Shadow

Quote from: brew on June 06, 2007, 09:24 PM
Then what's a long (by default) ?
I'm using Visual C++....

check using sizeof()


#include <iostream.h>

void main()
{
     cout << "Int: " << sizeof(int) << "\n" << "Long: " << sizeof(long) << "\n";
}
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

what the hell! so in VC++ an integer and a long are the same size.. what is the difference between the two? also what does VC++ use for a big endian 2 byte data type?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

l2k-Shadow

have to write a converting function if you're on a little endian system.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

MyndFyre

Quote from: brew on June 07, 2007, 08:26 AM
what the hell! so in VC++ an integer and a long are the same size.. what is the difference between the two? also what does VC++ use for a big endian 2 byte data type?

Since VC++ only targets Windows and Windows runs on little-endian systems only, VC++ does not use a big-endian 2-byte type.

Standard 2-byte type is short int.

These are the numeric types and macros defined in by the Windows platform SDK:

char = CHAR = signed 8-bit
unsigned char = BYTE = unsigned 8-bit
short int = SHORT = signed 16-bit
unsigned short int = WORD = unsigned 16-bit
long int = LONG = signed 32-bit
unsigned long int = DWORD = unsigned 32-bit
long long int = LONGLONG = __int64 = signed 64-bit
unsigned long long int = ULONGLONG = __uint64 = unsigned 64-bit
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

brew

For a 64 bit data type couldn't you also just use a double?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

l2k-Shadow

Quote from: brew on June 08, 2007, 07:10 AM
For a 64 bit data type couldn't you also just use a double?

yes but double is a floating point number.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

it could still store up to 2^64 in whole numbers with no decimals, right? Theoretically?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

|