|
Hi!
Somebody that have programmed an UDP-protocol in C or C++? I need to do so but I am not sure how to. I have been reading a lot about how UDP works and how it looks like, but still to make C-code is little bit complicate..
Anyone that can help me? Is there any open-source that I can look at? I can´t use win-sockets because I use a laborationsboard that don´t have any common OS. So I need to write it in C?
|
|
|
|
|
see at:
http://enet.cubik.org/Features.html
|
|
|
|
|
I need to do some sorting in a C-Scripting environment.
I have an array of string; e.g. "Fread2", "RobertThree", so just need a routine that will determine if string1 > string2.
I know I could write my own, but I bet it would be slow and I am sure that it has been done many times before.
Sweep.
PS The scripting environment has no Sort routines!
|
|
|
|
|
What about strcmp?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks, could not see the wood for the trees!
|
|
|
|
|
I am using a windows service program to open a CFileDialog. The file dialog box can be displayed and working.
However, when the choosing the Desktop folder, it goes to the "C:\Documents and Settings\All Users\Desktop" instead of the Desktop folder of the logged on user. When choosing the My Documents folder, it goes to the "C:\Documents and Settings\Default User\My Documents" folder instead of the logged on user's My Documents folder.
When clicking the New Folder icon, the newly created folder does not displayed unless F5 is pressed. When renaming/deleting folder, the displays update only after press F5.
When i use the same code to call CFileDialog in a non-service application, it works perfectly.
Can anyone help me to solve the problem?
Thx!!
|
|
|
|
|
douglas_kei wrote:
I am using a windows service program to open a CFileDialog.
See my response here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Most of services are running udner SYSYTEM account, but not under logged user account. This account has no "user folder", so it drops you to default user folder.
|
|
|
|
|
Yes, i know about this. But the question is, how can I set the service process environment so that CFileDialog works as if it is called by logged on user. Thx!
|
|
|
|
|
Does anybody know how to write a DDEML server application for
excel in VC++. I had used the code given by microsoft and modified it to how i needed it.
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q238/1/33.ASP&NoWebContent=1#appliesto
but for some reason the XlTable format is not working fast enough than i thought in Excel. any help is appreciated
|
|
|
|
|
Hi,
is there some trick to add a string at the top of the dropdown and not at the bottom? If so, how?
Thanks!
|
|
|
|
|
comboboxcontrolvariable.InsertString(index, string);
or something like that.
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
No trick, just use InsertString() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yeah I know... that was pretty dumb from my part
Thanks guys!
|
|
|
|
|
Hi!
I can't derive my CBaseRenderer class from CD3DBase, here's my code:
#pragma once
class CD3DBase;
class CBaseRenderer : public CD3DBase
{
public:
CBaseRenderer(void);
~CBaseRenderer(void);
public:
void OnLostDevice();
void OnResetDevice();
void OnFrameMove();
void OnRender();
void OnInitVolatileResources();
void OnFreeVolatileResources();
};
and these are the errors:
------ Build started: Project: DXProject, Configuration: Release Win32 ------<br />
<br />
Compiling...<br />
CBaseRenderer.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
DXProject.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
CD3DBase.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
CApplication.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined
What's wrong with this code?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You must include the header for the definition of CD3DBase. If you are deriving from a class then it is not enough just to have a forward reference, you need the full class available.
|
|
|
|
|
Ok thanks, but if I include the header, I get even more errors, since CBaseRenderer and CD3DBase include each other, because CD3DBase needs to create an object of CBaseRenderer
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You could put a forward declaration of CBaseRenderer into CD3DBase.h
|
|
|
|
|
Ok, next errors
#pragma once
class CBaseRenderer;
class CD3DBase
{
private:
CBaseRenderer gRenderer;
};
And here the errors:
e:\C++\DXProject\CD3DBase.h(46) : error C2079: 'CD3DBase::gRenderer' uses undefined class 'CBaseRenderer
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You're missing #include "BaseRenderer.h" or you can make gRenderer a pointer.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
tried both. this eliminated all errors, except that now I get this one again:
e:\C++\DXProject\CBaseRenderer.h(5) : error C2504: 'CD3DBase' : base class undefined
#pragma once
#include "CD3DBase.h"
class CBaseRenderer : public CD3DBase
{ ...
but well...since I only need a pointer to an IDirect3DDevice9 from CD3DBase, I might also create a function to pass this one as a parameter and make CBaseRender not to inherit from CD3DBase.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
you have a dependecy loop.
"a.h" file includes "b.h"
and "b.h" file includes "a.h"
when you derive the derivated class has to know the type tou derive from so you need the definition of the type not the declaration
of that type.
|
|
|
|
|
How come that this line will compile in VS 6.0 but not in VS 7.0?
strOut += strData[iPos] ^ strKey[iKeyPos++];
strOut, strData and strKey are Cstring.
IPos and iKeyPos is int.
I got the compiler error: C2593: 'operator +=' is ambiguous (watch my code)
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
d00_ape wrote:
How come that this line will compile in VS 6.0 but not in VS 7.0?
Actually, with warning level 4, VS6 also complains.
d00_ape wrote:
I got the compiler error: C2593: 'operator +=' is ambiguous (watch my code)
Of the various CString += operators, more than one of them matches the strData[iPos] ^ strKey[iKeyPos++] return value. Does this help:
strOut += (char) (strData[iPos] ^ strKey[iKeyPos++]);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
strOut += (char) (strData[iPos] ^ strKey[iKeyPos++]);
It really helped. And still work with that XOR. THANKS!!
_____________________________
...and justice for all
APe
|
|
|
|