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 [CODE]hr = CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_LOCAL_SERVER | CLSCTX_NO_CODE_DOWNLOAD, IID_INetConnectionManager, reinterpret_cast<LPVOID *>(&pNetConnectionManager) ); [/CODE] 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

Member Avatar
Member Avatar
+0 forum 2

Hey guys I have come up with a solution for the problem I have but I would like to know how I could do this the way I initially had it set up but without the leak of course. vec3f.h [CODE]class vec3f { public: GLfloat _x, _y, _z; vec3f(){}; vec3f( GLfloat x, GLfloat y, GLfloat z ) { _x = x; _y = y; _z = z; } *operator GLfloat() { GLfloat *_r = new GLfloat[3]; //the problem _r[0] = _x; _r[1] = _y; _r[2] = _z; return _r; } }[/CODE] Now I know I am calling the new operator …

Member Avatar
Member Avatar
+0 forum 9

So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef struct Font { const char* name; LONG height; GLuint base; GLYPHMETRICSFLOAT gmf[255]; };[/CODE] Font creation and display functions: [CODE]void FONT::SetFont(const char* name, LONG height) //sets the font for the FontInstance { HFONT hFont; LOGFONT logfont; logfont.lfHeight = -20; //this number does absolutely nothing logfont.lfWidth = 0; logfont.lfEscapement = 0; logfont.lfOrientation …

Member Avatar
Member Avatar
+0 forum 2

So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef struct Font { const char* name; LONG height; GLuint base; GLYPHMETRICSFLOAT gmf[255]; };[/CODE] Font creation and display functions: [CODE]void FONT::SetFont(const char* name, LONG height) //sets the font for the FontInstance { HFONT hFont; LOGFONT logfont; logfont.lfHeight = -20; //this number does absolutely nothing logfont.lfWidth = 0; logfont.lfEscapement = 0; logfont.lfOrientation …

Member Avatar
Member Avatar
+0 forum 2

Hey guys I have no clue as to why my computer keeps defaulting my memory to 2 GB every time I reboot my computer. I have 4 GB installed and it runs at 3.25 GB on win XP on the first run. I found out that if I boot my computer to BIOS then turn it off and pull my ram out and reinstall the ram it goes back to 4 GB but only for that boot. Thanks

Member Avatar
Member Avatar
+0 forum 10

Does anyone know of any good OpenGL selection tutorials that go over how to process more than 64 objects? The only tutorials that I can find deal with under 64 objects and when they mention more than that they say use a loop but don't go into any detail. Thanks

Member Avatar
Member Avatar
+0 forum 1

I am making a rubix cube game in OpenGL and I have run into a problem with rotations. When doing multiple rotations (x, y, z) the axis gets rotated as well (ie when doing an x-axis rotation of 90 or 270 deg the y-axis becomes the z-axis and z-axis becomes the y-axis). Is there any way to stop the axis from rotating but allowing the object to translate or is there a trick to get around this. Here is a small part of my code for the translations. [CODE]glPushMatrix(); glRotatef(xrot, 1.0, 0.0, 0.0); //rotates the unit cube into place glRotatef(yrot, …

Member Avatar
Member Avatar
+0 forum 3

Hi, I was wondering if anyone could help me figure out how to see who is connected to you when you are hosting a game on a specific port via c++. I know you can use netstat in cmd prompt and it shows a bunch of info of who you are connected to and stuff. What I want to do is make a program with C++/win32 api and winsock that detects people connecting to me and I would like to be able to ping to that IP or disconnect them. Thanks for those that take the time to read this.

Member Avatar
Member Avatar
+0 forum 2

Hey I was wondering how the string class is able to output its self the way it does. For example: [CODE]#include <iostream> #include <string> using namespace std; int main() { string testString; testString = "Hello"; cout << testString << endl; system("PAUSE"); return 0; }[/CODE] If I were to try to make a mimic class such as [CODE]#include <iostream> #include <string> using namespace std; class myClass { string content; public: void operator=(string newContent) { content = newContent; } string getContent() { return content; } }; int main() { myClass testString; testString = "Hello"; cout << testString.getContent() << endl; system("PAUSE"); return 0; …

Member Avatar
Member Avatar
+0 forum 3

Hi I have been trying for a while to make a win32 app client be able to talk to a server app that I put on my friends computer. I am not 100% sure if the problem is caused by the fact that I have two routers which may interfere with my IP address. The following code works on my LAN and with the loop back address 127.0.0.1. I am gonna put up the parts that have to do with winsock since it is using SDL/C++/winsock For the client [CODE]bool ConnectToHost( int PortNo, char* IPAddress ) { WSADATA wsadata; int …

Member Avatar
Member Avatar
+0 forum 7

The End.