Question about replacing a stub...

Joshua Walker halkun2002 at
Sun Dec 28 22:16:43 CST 2003

Hi all.
     On my ever winding quest to fill in the win32 API
documentation, I have found, I think, an intresting
     When the documentation is generated with, it checks the .spec file to see if the
function is a stub or not. The problem is that if it
is a stub, no documentation will be generated for that
API. I've decieded to take it upon myself to "fill in
the blankes" as it were, but I need to know if I'm
doing this correctly.

For my example I'm going to use the stubbed function
"AdjustTokenGroups" that is found in avdapi32.dll.

The fist thing I did was update the .spec file so will parse the function correctly.

I changed
@ stub AdjustTokenGroups

@ stdcall AdjustTokenGroups (long long ptr long ptr

That allows c2man to parse the function. So now all I
need to do is add that function to security.c. I added
the following.
 * AdjustTokenGroups [ADVAPI32.@]
 * Adjust the group privileges of an open token

  HANDLE TokenHandle,
  BOOL ResetToDefault,
  DWORD BufferLength,
  PTOKEN_GROUPS PreviousState,
  PDWORD ReturnLength

And whamo-blamo, the documentation is generated...

Now, I'm not too hot on coding, did I just break
something to get my API to document? Should I be
adding a fixme? Should I be returning something even
though it's an empty function? I didn't compile it to
see if it worked.The AdjustTokenGroups.html file that
was generated says "Not defined in a Wine header. The
function is either undocumented, or missing from
Wine." Is it ok to leave that right now? Should I me
putting something in a header file somewhere?

Just wondering.


More information about the wine-devel mailing list