0

Hey I am running into a problem with CoCreateInstance() in a program that I am using to try to disable all the network adapters.

When I try to use

hr = CoCreateInstance(CLSID_ConnectionManager,
		NULL,
		CLSCTX_LOCAL_SERVER | CLSCTX_NO_CODE_DOWNLOAD,
		IID_INetConnectionManager,
		reinterpret_cast<LPVOID *>(&pNetConnectionManager)
		);

I get two errors.

undefined reference to `_IID_INetConnectionManager'
undefined reference to `_CLSID_ConnectionManager'

I am using Code::Blocks and Windows XP.

Also I have the following headers/libs
windows.h
objbase.h
Netcon.h
libole32.a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by sfuo
0

The error messages indicate you are not linking with one or more required libraries. I don't know which one(s) though.

Have you seen this thread?

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.