Connecting Tech Pros Worldwide Forums | Help | Site Map

equivalent c data types for vc++ data types

ramu
Guest
 
Posts: n/a
#1: Feb 20 '06
Hi

I have to call a vc++ function in a c program.
suppose i have a function

dword fun(dword arg1, bstr arg2); in vc++.

I have to call this function in c. But I don't have dword datatype in
c. So when i call this function in c, i have to convert all the data
tpyes of vc++ into c data types. Or I must have equivalent data types
in c.
And then i have to replace those equivalent datatypes in the function
and then I must execute the function in c.

One more thing am using linux to run c program and windows for Vc++.

Can anyone give me an idea how to achieve this?


Thanks in Advance


Nick Keighley
Guest
 
Posts: n/a
#2: Feb 20 '06

re: equivalent c data types for vc++ data types


ramu wrote:
[color=blue]
> I have to call a vc++ function in a c program.
> suppose i have a function
>
> dword fun(dword arg1, bstr arg2); in vc++.
>
> I have to call this function in c. But I don't have dword datatype in
> c. So when i call this function in c, i have to convert all the data
> tpyes of vc++ into c data types. Or I must have equivalent data types
> in c.
> And then i have to replace those equivalent datatypes in the function
> and then I must execute the function in c.
>
> One more thing am using linux to run c program and windows for Vc++.
>
> Can anyone give me an idea how to achieve this?[/color]

strictly this is off topic to this newsgroup. You need to ask on a
microsoft
specific group.

But I'm a little confused. How are you calling windows specific
functions
without including MS specific headers (eg. windows.h). If the headers
are
present then the MS datatypes should be.


--
Nick Keighley

rlblaster
Guest
 
Posts: n/a
#3: Feb 20 '06

re: equivalent c data types for vc++ data types



ramu wrote:[color=blue]
> Hi
>
> I have to call a vc++ function in a c program.
> suppose i have a function
>
> dword fun(dword arg1, bstr arg2); in vc++.
>
> I have to call this function in c. But I don't have dword datatype in
> c. So when i call this function in c, i have to convert all the data
> tpyes of vc++ into c data types. Or I must have equivalent data types
> in c.
> And then i have to replace those equivalent datatypes in the function
> and then I must execute the function in c.
>
> One more thing am using linux to run c program and windows for Vc++.
>
> Can anyone give me an idea how to achieve this?
>
>
> Thanks in Advance[/color]

The dword should be written as DWORD, and windows.h should be also
included. If it isn't so, then you should typedef it for yourself (
DWORD is unsigned long ).

Closed Thread