Simple Question - Please Answer -- Anyone??!! 
Author Message
 Simple Question - Please Answer -- Anyone??!!

Hi. Thanks for taking a look at my question.

Could you please explain to me how you interpret the following:

        typedef struct tm_request * TM_REQUEST ;

This is in a header file that is part of some demo code on how to use a
Win32 DLL.

Many of the functions exported in this custom DLL ("exposed" via a Users
Guide - the DLL is not a COM component - just a straight - normal - DLL as
far as I can tell) pass variables of type TM_REQUEST back and forth between
functions.

I'm trying to write some VB5 code that is an ActiveX DLL in-process server
"wrapper" around this custom DLL I must use (the source code is unavailable
to me - the custom DLL is a licensed component). Hence why I am trying to
understand the typdef variable declaration.

I understand the statement to say:

        "any variables declared as type TM_REQUEST will be pointers to a
tm_request structure"

Firstly, the space between the * and TM_REQUEST may be throwing me off as I
know that it is different to *TM_REQUEST, but I only understand the latter
(could someone please explain the difference to me?).

Secondly, I've asked the DLL vendor to tell me what a tm_request structure
looks like. They tell me that I've all the header files and sample C code I
need to communicate with the DLL. I say I need to know what a tm_request
structure looks like so that I may create (in VB5) a User Defined Type
cvariable that matches, so that I can pass this variable type back and
forth to their DLL functions. They say that after searching their entire C
source code (the code used to build the DLL) that their is no reference to
a struct tm_request { ..... };

Have I misunderstood something here????

Please email me if you can shed any light.




Sat, 09 Dec 2000 03:00:00 GMT  
 Simple Question - Please Answer -- Anyone??!!

Your interpretation of the declaration is correct.  TM_REQUEST is of type
pointer to struct tm_request.

The space before or after the star does not matter and is purely a style
issue.

If you don't need access to the member of the structure, you can safely
treat it like a "void *" pointer.  Presumably the library has some method of
handing you an initialized pointer, and the other routines simply take that
pointer.  Similarly, you can just treat it like a HANDLE in any of the Win32
functions that you are probably familiar with.

If you do need access to the members of that structure, it will be in one of
the header files.  Otherwise, it's just a pointer to an abstract data type
that you shouldn't be too worried about.

Quote:

>Hi. Thanks for taking a look at my question.

>Could you please explain to me how you interpret the following:

> typedef struct tm_request * TM_REQUEST ;

>This is in a header file that is part of some demo code on how to use a
>Win32 DLL.

>Many of the functions exported in this custom DLL ("exposed" via a Users
>Guide - the DLL is not a COM component - just a straight - normal - DLL as
>far as I can tell) pass variables of type TM_REQUEST back and forth between
>functions.

>I'm trying to write some VB5 code that is an ActiveX DLL in-process server
>"wrapper" around this custom DLL I must use (the source code is unavailable
>to me - the custom DLL is a licensed component). Hence why I am trying to
>understand the typdef variable declaration.

>I understand the statement to say:

> "any variables declared as type TM_REQUEST will be pointers to a
>tm_request structure"

>Firstly, the space between the * and TM_REQUEST may be throwing me off as I
>know that it is different to *TM_REQUEST, but I only understand the latter
>(could someone please explain the difference to me?).

>Secondly, I've asked the DLL vendor to tell me what a tm_request structure
>looks like. They tell me that I've all the header files and sample C code I
>need to communicate with the DLL. I say I need to know what a tm_request
>structure looks like so that I may create (in VB5) a User Defined Type
>cvariable that matches, so that I can pass this variable type back and
>forth to their DLL functions. They say that after searching their entire C
>source code (the code used to build the DLL) that their is no reference to
>a struct tm_request { ..... };

>Have I misunderstood something here????



Sun, 10 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can anyone answer this question

2. Can anyone answer the question?

3. Why doesn't anyone answer this question?

4. A simple question, but still no answer

5. simple question, pls answer\

6. Simple question ( for those how knows the answer )

7. This question must have a simple answer.

8. Help... V Simple Questions Need Answering

9. simple 2 line answer socket question

10. Need answer for probably very simple question...

11. A question for a simple answer

12. can anyone help with a simple question

 

 
Powered by phpBB® Forum Software