Thank you all for your responses. To be clear, dfs.cpp does #include <lmdfs.h>
And it seems I have goofed slightly in my descrtiption (apologies.)
dfs.h has these declarations that seem to corraspond to the linker errors:
133: XS(XS_NT__Lanman_NetDfsRename);
154: XS(XS_NT__Lanman_NetDfsMove);
amd domain.h:
93: XS(XS_NT__Lanman_NetEnumerateTrustedDomains);
111: XS(XS_NT__Lanman_I_NetGetDCList);
And these "XS" functions are defined. It's the functions they call from within that's the problem:
IE: (dfs.cpp:315)
XS(XS_NT__Lanman_NetDfsRemove)
{
[...]
LastError(NetDfsRemove(entryPath, server, share));
[...]
}
Interestingly, in domain.h, in the comment block directly preceding "XS(XS_NT__Lanman_NetEnumerateTrustedDomains);" it mentioned the following:
(reformated slightly for readability.)
domain.h:83
// important: if you need to compile this module, please change the
// function prototype in lmaccess.h to the following:
//
// NTSTATUS NET_API_FUNCTION NetEnumerateTrustedDomains(
// IN LPWSTR ServerName OPTIONAL, OUT LPWSTR *DomainNames);
This is the best clue I've found so far.
Ok, so I opened "C:\Program Files\Microsoft SDK\Include\LMAccess.h" and at line 1378 I see:
NTSTATUS NET_API_FUNCTION
NetEnumerateTrustedDomains (
IN LPWSTR ServerName OPTIONAL,
OUT LPWSTR *DomainNames
);
So to be sure I went and opened "C:\Program Files\Microsoft Visual Studio\6.0\VC98\Include\LMACCESS.H" and at line 1311 I see:
NTSTATUS
NetEnumerateTrustedDomains (
IN LPWSTR ServerName OPTIONAL,
OUT LPWSTR *DomainNames
);
Which appears to be missing the "NET_API_FUNCTION" part.
I added "NET_API_FUNCTION" and deleted "perl.10xx.release\domain.obj" and re-ran "vc6 nmake" (vc6 is a batch file that setups the correct environment for vc6) and domain.obj recompiled but I got the same linker errors.
Thank for the help so far.
The thing I really don't get is that all the unresolved symbols the linker complains about all have leading underscores (ie, _NetDfsRename, _NetDfsMove, _NetEnumerateTrustedDomains, _I_NetGetDCList) but the actual calls in the .cpp files have no underscores (ie, NetDfsRemove, NetDfsMove, NetEnumerateTrustedDomains, I_NetGetDCList), yet other functions like XS(XS_NT__Lanman_NetDfsRename), which calls NetDfsRename, works fine.
Any more insight is very much appreciated. |