On Fri, 16 Jul 2004 17:19:17 +0200, "Volker Bartheld (SPAM only)"
<> wrote in comp.lang.c:
> Hi!
>
> On Fri, 16 Jul 2004 13:24:50 GMT, "andthen" <> wrote :
> >I'm using a windows library function which does not return anything useful
> >(EnumWindows... returns a BOOL), I give it a pointer to a callback function
> >and it sends the data I want to the callback function. My question is, what
> >is the best way to get that data into the initial function,
>
>
> struct WNDSTRUCT_t
> {
> HWND m_hFirst;
> };
>
> BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
In the absence of supporting macro definitions, the above is a nothing
but a syntax error in C.
> {
> assert(lParam);
> WNDSTRUCT_t* pWndStruct=(WNDSTRUCT_t*)lParam;
> pWndStruct->m_hFirst=hWnd;
> return FALSE;
> }
>
> void main(void)
^^^^
Oh, you're not programming in C, although you might think that you
are. You're in the newsgroup. In C, main() returns int in a hosted
environment.
PS: The Windows API is not part of the C language or library and is
severely off-topic here.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html