DLL article question Resolved
-
Windows 10, Visual Studio 2012, C++, DLL I am working on understanding DLLs and reference this article: http://www.codeproject.com/Articles/28969/HowTo-Export-C-classes-from-a-DLL?msg=5204076#xx5204076xx In there I find the phrase:
typedef struct tagXYZHANDLE {} * XYZHANDLE;
I downloaded the code and found only that one instance. I understand tyepdef and struct, but those empty braces throw me. Especially since I found only that one instance. Please point me to something that provides an explanation for what this is doing. Is there a particular name for that type of declaration?
Thank you for your time
-
Windows 10, Visual Studio 2012, C++, DLL I am working on understanding DLLs and reference this article: http://www.codeproject.com/Articles/28969/HowTo-Export-C-classes-from-a-DLL?msg=5204076#xx5204076xx In there I find the phrase:
typedef struct tagXYZHANDLE {} * XYZHANDLE;
I downloaded the code and found only that one instance. I understand tyepdef and struct, but those empty braces throw me. Especially since I found only that one instance. Please point me to something that provides an explanation for what this is doing. Is there a particular name for that type of declaration?
Thank you for your time
The braces are simply representing a structure with no members. And the
*XYZHANDLE
means thatXYZHANDLE
is a pointer to atagXYZHANDLE
structure. It's the fact that they put both braces on the same line that makes it look confusing. Consider:typedef struct tagXYZHANDLE
{} *PXYZHANDLE;
In fact, this is how the Windows type
HANDLE
is declared, as a pointer to an empty structure.The difficult we do right away... ...the impossible takes slightly longer.
-
The braces are simply representing a structure with no members. And the
*XYZHANDLE
means thatXYZHANDLE
is a pointer to atagXYZHANDLE
structure. It's the fact that they put both braces on the same line that makes it look confusing. Consider:typedef struct tagXYZHANDLE
{} *PXYZHANDLE;
In fact, this is how the Windows type
HANDLE
is declared, as a pointer to an empty structure.The difficult we do right away... ...the impossible takes slightly longer.
OK, I see that now. And I see why he did that. I often have a difficult time seeing the obvious. Thank you for pointing that out and taking the time to reply.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com