|
Hi !
I am ran into a great problem I can not solve. I need to write a Dial-Up Server project in Win98 by visual c++.
I do followed steps:
1) With TAPI wrote a program that can wait fo call.
2) After client Dial-in (by Dial-up networking),my program answer and connect to client. But problem is here that I can't write the code that build the RADIUS packet for reply to packet that is sent from client.
If could help, please let me know.
A BIG thanks in advance.
|
|
|
|
|
Hi Guys this is very urgent!.
I am tryieng to use extern in my application. I am declaring
extern CAzg a;
and also I have specified header file in include
but I ma getting linkage error.
Can any one solve this and can tell me how to over come this problem.
God Knows Better
|
|
|
|
|
Your project also needs a .cpp file that contains the definition of a , i.e:
CAzg a;
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Yes I have both .h and .cpp file in the project folder.
God Knows Better
|
|
|
|
|
Couldn't you have asked God for help?
--
They're out get me, I can't escape cos' they won't let me
They won't forget me, they'll get me in their grip and sweat me
They'll wait me out, and then move in under my skin
They'll make me doubt, they're out to make me let them in
|
|
|
|
|
Thanks for your Great suggestion. My God bless you!!
God Knows Better
|
|
|
|
|
Hi! I am writing a custom control, and I would want to draw two overlapping images using transparency. I have written this code, but it does not work! Does anybody know the correct way of drawing overlapping bitmaps with transparency ? Thank you !
void CMyClass::DCDrawBitmap(HBITMAP hBitmap,LPRECT lpRect)
{
CDC* pDC = this->GetDC();
CDC dcSrc;
dcSrc.CreateCompatibleDC(pDC);
dcSrc.DrawState(CPoint(0,0),CSize(m_iCellWidth, m_iCellHeight),
hBitmap,DST_BITMAP|DSS_NORMAL);
pDC->TransparentBlt(lpRect->left,lpRect->top,m_iCellWidth,m_iCellHeight, &dcSrc,0,0,m_iCellWidth,m_iCellHeight,RGB(255,255,255));
ReleaseDC(&dcSrc);
ReleaseDC(pDC);
}
www.eugigames.tk
|
|
|
|
|
I want to return data in m_pStack[0] from a method. m_pStack is declared like this:
char** m_pStack = new char*[bla bla];
My method looks like:
void CStack::Pop(char* elem)
{
elem = m_pStack[0];
...
}
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Aargh.. I'm too fast to post messages... memcpy is my solution.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Hi There,
I am workin on a MDI Document. in that i have a view which will display a Bitmap Image. Every time i open my Bitmap image a new instance of Document class is being created. But what my requirement is that every time i open a Bitmap it should be opend in the Document instance that has been created at the starting of the application.
How can i do it. plz help me out its urgent.
Sreeramachandra G
|
|
|
|
|
I just want to know that how can we submitt our research papers to Microsoft so that it will publish it in its Journal.
God Knows Better
|
|
|
|
|
If you have a string:
char * pName="Paul";
You need to write a small code to reverse the string. The code must be as efficient as possible:
char * pReversedName;
int nLength=0;
nLength=strlen(pName);
pReversedName= new char[nLength];
//Just a simple byte-to-byte copy:
for(int i=0; i
|
|
|
|
|
c-strings are null terminated, always add one to the length of the string if you need to copy the whole string.
pReversedName = new char[nLength+1];
or better yet, use the STL string class (std::string)
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thanks. But besides that, do you think there's an even more efficient way of spelling a string backward? Using ANSI C++?
|
|
|
|
|
Yes. Use a single string.
char* myString = "Paul";
reverseString (myString);
void reverseString
(char* pString)
{
for (nIndex=0; (nIndex < strlen (pString)); nIndex++) {
long nTarget = strlen (pString) - nIndex - 1;
if (nIndex != nTarget) {
char chTemp = pString [nIndex];
pString [nIndex] = pString [nTarget];
pString [nTarget] = chTemp;
}
}
} /ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
You're version doesn't work because it goes to the trouble of reversing the string twice.
void reverseString (char* pString)
{
int nLast = strlen (pString) - 1;
for (int nIndex = 0; nIndex < nLast; nIndex++, nLast--)
{
char chTemp = pString [nIndex];
pString [nIndex] = pString [nLast];
pString [nLast] = chTemp;
}
}
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Argh! You're right, of course! I really shouldn't post this early in the morning.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
char *pReversedName = _strdup(pName);
_strrev(pReversedName); Note that both _strdup and _strrev are in the standard C library. Using the library functions is 'small', both in terms of the code you write (two function calls) and the efficiency of the code (the library operations are probably optimized).
Software Zen: delete this;
|
|
|
|
|
Drat. I should have had coffee before posting my reply.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Well, if you drank the coffee I make, you would have had the solution too. My coffee has a pH of about 1.2, and requires a doctor's prescription.
(I'm on my third cup this morning, and it's a big cup)
Software Zen: delete this;
|
|
|
|
|
|
Can anyone tell me what's the most efficient way to retrieve the middle node from a link list, without having to count the nodes, for one?
Thanks!
|
|
|
|
|
If you have a pointer to the head and tail of the list, you can walk those pointers in opposite directions until they're equal. You're then pointing to the "middle" of the linked list. Of course, this only works when the number of elements in the list is odd.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Running count is sensible thing to do. But Traversing from both ends sounds like a very alternative option - I'll look into that. Just wondering if it's actually more efficient than keeping count.. Thanks!
|
|
|
|