- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My software requires that I obtain the network node identifier of the network card and I should be able to obtain this at run time using the GetClusterNodeID API. However, the code show below results in an unsatisfied external for GetClusterNodeID when I link the program. Any suggestions? Am I missing a module or library (I am linking with clusapi.lib.
use dfport
integer*4 NodeIDCount,hNode
character*256 NodeID
lpszNodeID = loc(NodeID)
NodeIDCount = 256
lpcchNodeID = loc(NodeIDCount)
hNode = NULL
istatus = GetClusterNodeID(hNode,lpszNodeID,lpcchNodeID)
use dfport
integer*4 NodeIDCount,hNode
character*256 NodeID
lpszNodeID = loc(NodeID)
NodeIDCount = 256
lpcchNodeID = loc(NodeIDCount)
hNode = NULL
istatus = GetClusterNodeID(hNode,lpszNodeID,lpcchNodeID)
Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CVF doesn't include declarations for routines in clusapi.lib. You'll have to write your own INTERFACE block for it.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve... Now can anyone tell me what the interface should look like. Declaring an integer function with integer arguements still gives me an unsatisfied external reference. Has anyone out there written the interface to GetClusterNodeID?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
INTERFACE
INTEGER FUNCTION GetClusterNodeId(hNode,lpszNodeID,lpcchNodeID)
!DEC$ATTRIBUTES STDCALL, ALIAS: "_GetClusterNodeId@12":: GetClusterNodeId
INTEGER:: hNode, lpszNodeID, lpcchNodeID
END FUNCTION
END INTERFACE
Of course, don't forget to add Clusapi.lib to Project/Settings/Link.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I could give you the interface (and will), but I don't think it will help you. Did you spot the note in the documentation that this service was available for Windows NT Enterprise Server Edition 4.0 only?
If you still want to use it, the interface would be:
Offhand, I don't know how you would retrieve the Ethernet address.
If you still want to use it, the interface would be:
interface integer(SINT) function GetClusterNodeId (hnode, & lpszNodeID, lpcchNodeID) !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE :: GetClusterNodeID !DEC$ ATTRIBUTES ALIAS:"GetClusterNodeId" :: GetClusterNodeID INTEGER(HANDLE), INTENT(IN) :: hnode INTEGER(LPWSTR), INTENT(OUT) :: lpszNodeID !DEC$ ATTRIBUTES REFERENCE ::lpszNodeID INTEGER(DWORD), INTENT(INOUT) :: lpcchNodeID !DEC$ ATTRIBUTES REFERENCE :: lpcchNodeID end function GetClusterNodeId end interface
Offhand, I don't know how you would retrieve the Ethernet address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks jugoslavdujic... I left out the alias.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK Steve, you're right as usual. The procedure compiles and links, but doesn't return anything when I make the call. I am attempting to write a nodelock proceedure and need to retrieve the physical address of the network card. Is there any way that you know of to do this other than with GetClusterNodeID? Is there a registry entry containing this address or am I out of luck?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dunno. Maybe one of the NDIS functions? I found one that gets a software address from the registry, but I don't think that's what you want.
Would be a good question for the Win32 programming newsgroup - just ask which Win32 API routine returns the hardware MAC address of the Ethernet adapter. Keep in mind that some systems have more than one Ethernet adapter, so you probably need to enumerate them and query them all.
Steve
Would be a good question for the Win32 programming newsgroup - just ask which Win32 API routine returns the hardware MAC address of the Ethernet adapter. Keep in mind that some systems have more than one Ethernet adapter, so you probably need to enumerate them and query them all.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks elementyl.... however, it appears that all the methods discussed in your link are either not supported on NT or not supported in CVF. At least, I could not find the required interfaces and structures in the CVF modules in the DF98 include folder. Maybe the best way to get the network adapter id is through a call to a C++ procedure, such as the one shown on the web page you refered me to. Anyway, thanks... I'll keep looking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, don't let that deter you. If I stopped every time CVF didn't have an interface for something I would have quit a long time ago. :-) In these cases you simply need to define the data structure(s) and the necessary call interface(s) for your method of choice and it is certainly no problem to implement any of those methods in CVF.
James
James
![](/skins/images/1FC86CD46823E418D1E2B7B4DC10231C/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page