|
I want to send the 0x68 packet to my game.
I believe the client receives packets from the game server on port 6112, if this can help.
Thanks,
~Mike
|
|
|
|
|
Yes, read my posting above. Sending packets to game (servers) has nothing to do with PostMessage() or SendMessage() .
You need to use UDP (most games use UDP, don't know which ones use TCP).
Take a look at this article and its links section.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
WHOA .
PostMessage() is used to send Windows messages to windows, those funny things on the screen you interactive with.
The phrases 'online game', '0x68 packet', 'game server', and 'port 6112' tell me that you are trying to send a specific packet to an online game, and that the game communicates using TCP/IP sockets. That is a whole 'nother kettle of fish.
For introductory articles on socket programming under Windows, try here[^], here[^], and here[^].
You will also need to know the format of the packets used by the game to communicate.
Software Zen: delete this;
|
|
|
|
|
So basically I have to create a UDP socket on my game server's ip and write my packet onto it... Am I right?
Thanks,
~Mike
|
|
|
|
|
That's right. Like I mentioned in my earlier message, you'll need to know the format of the packet (how many bytes, what each byte means, and so on). Good luck.
Software Zen: delete this;
|
|
|
|
|
I have a Internet Shortcut in a control that I want to drag onto Explorer. I have looked at Michael Dunn's article and it almost works but it wants to copy the file to Explorer. Of course it is not a file, it is just data and I want to drag this data to Explorer and create a shortcut based on the data. In other words I have a list control of internet shortcuts and I want to drag one or more to Explorer. How can I do this? Thank you
|
|
|
|
|
I want to write a mini app (GUI) to start and stop my service remotely. I want to connect to the remote computer using this mini app(GUI) and start or stop or even querry the status of a service. I use c but i welcome c++ code.
thankx!
|
|
|
|
|
One solution is winsock.
Kuphryn
|
|
|
|
|
you can use WMI APIs.
MSDN contains a lots of examples
The returned pointer may be temporary and should not be stored for later use.
|
|
|
|
|
i'm using the following:
HGLOBAL hmem;
LPTSTR local_buf;
hmem = GlobalAlloc(GMEM_MOVEABLE,500);
local_buf = (LPTSTR)GlobalLock(hmem);
lstrcpy(local_buf,"My Test");
GlobalUnlock(hmem);
if (OpenClipboard(NULL)) // i don't have a window
{
EmptyClipboard();
SetClipboardData(CF_TEXT,hmem);
}
////////////
When debugging, the OpenClipboard,EmptyClipboard worked fine, but SetClipboardData returns NULL.
After formatting the message, i got "Thread does not have a clipboard open."
i need to generally copy a CF_TEXT string to the clipboard.
I checked MSDN, but everything looks fine. What is the problem?
Thanks.
|
|
|
|
|
One solution is COleDataSource.
HANDLE hmem = ::GlobalAlloc(GMEM_MOVEABLE, 500);
PTSTR local_buf = static_cast<ptstr>(::GlobalLock(hmem));
_tcscpy(local_buf, "2004");
::GlobalUnlock(local_buf);
COleDataSource *pODS = new COleDataSource;
pODS->CacheGlobalData(CF_TEXT, hmem);
pODS->SetClipboard();
Kuphryn
|
|
|
|
|
i'm not using MFC. can you send an example without using it?
Thanks.
|
|
|
|
|
I'm an IT student University of Bina Nusantara, Indonesia. I need you help with my program about editorial using extended key. Please... this project will help me raise my grade.
Editor program C
Tulis program yang berfungsi sebagai editor teks program C. Keluaran editor ini adalah program C (fle teks, ASCII). Editor ini harus memiliki kemampuan menyunting program sampai 1000 (seribu) baris dan 255 kolom.
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
21
22
23
24
File Edit About
NONAME Line 99 Col 99 Insert ON
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
19
2021
22
23
24
File Edit About
*************
* New *
* Open *
* Close *
* Save *
* Save As *
* Print *
* Exit *
*************
NONAME Line 99 Col 99 Insert ON
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
21
22
23
24
File Edit About
*************
* Copy *
* Paste *
* Find *
* Replace *
*************
NONAME Line 99 Col 99 Insert ON
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
21
22
23
24
File Edit About
*************
* Version *
* Author *
*************
NONAME Line 99 Col 99 Insert ON
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
20
21
22
23
24
File Edit About
*******************
* Binus C Editor *
* Version 1.0 *
* 2003 *
* © UBiNus *
*******************
NONAME Line 99 Col 99 Insert ON
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
..
..
..
19
2021
22
23
24
File Edit About
*********************************
* 0700999999 Ahmad Wicaksono *
* 0700999999 Bong Wei Chen *
* 0700999999 Chandra Simatupang *
* 0700999999 Deryl Liem *
* TI UBiNus, 1PAT, 2003 *
*********************************
NONAME Line 99 Col 99 Insert ON
Every time you choose NEW then the monitor automaticlly adds #include and void main() {}
1 2 3 4 5 6 7 8
12345678901234567890123457689012345768901234576890123457689012345768901234576890
1
2
3
4
5
6
7
..
19
2021
22
23
24
File Edit About
# include <stdio.h>
# include <conio.h>
void main() {
_
}
NONAME Line 5 Col 1 Insert ON
If you write For, the monitor automaticlly add (; ; ) { } become
for (; ; ) {
}
If you write While, the monitor automaticlly add () { } become
while ( ) {
}
If you write Do, the monitor automaticlly add { } while (); become
do {
} while ( );
If you write If, the monitor automaticlly add () { } else { } become
if ( ) {
} else {
}
If you write Switch, the monitor automaticlly add () { case: brek; } become
switch () {
case: break;
}
please help my project... I'm in a dead end.
student
|
|
|
|
|
IT student wrote:
NONAME Line 5 Col 1 Insert ON
seems like you screen dumped you code on to code project forum...Another guy with xmas gift.
Programming is an art not a skill, every one can be a skilled programmer but not an artist.
|
|
|
|
|
Hello,
I was trying to create a dialog containing a calendar, so I decided to use the Month Calendar proposed by VC++ in the control bar.
But during the execution, when I click the calendar and display the selected day, I remarked that the day was wrong, 12 days more than the day I effectively clicked ...
I search in the MSDN CD to find an example and install the CmnCtrl1 project.
The MSDN project calendar reacts in the same way, 12 days more as soon as you click on another day that the current day.
Do I miss something in the use of this control ? Is it bugged ? If yes, is there a solution/workaround ? Can I use it with Win2K ?
Thanks in advance
DD
PS : I use Visual Studio 6.0 with Win2K
|
|
|
|
|
In fact, I found the solution on another forum.
Here is the wrong code proposed by microsoft :
CString pDate;
CTime ct;
if( m_MonthCal_1.GetCurSel(ct) )
{
pDate.Format(_T("%02d/%02d/%2d"),ct.GetMonth(),ct.GetDay(),ct.GetYear());
AfxMessageBox(pDate); // just for testing
}
Here is the right code :
CString pDate;
SYSTEMTIME ct;
if( m_MonthCal_1.GetCurSel(&ct) )
{
pDate.Format(_T("%02d/%02d/%2d"),ct.wMonth ,ct.wDay, ct.wYear );
AfxMessageBox(pDate); // just for testing
}
The correct way is to use a SYSTEMTIME instead of a CTime type ...
DD
|
|
|
|
|
hi guys
anyone knows how to use functions in dlls in another dll.
i'm writing a small app which use some functions in a dll(dlla).but in dlla,i use some functions in another dll(dll2),
how to do?
thanks
johns
01/04
|
|
|
|
|
I belive it is same as calling methods in dlla from ur application.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
That depends on how you are using the functions/class in the DLL and if one or both are MFC extension DLLs. There are articles on this site that can help explain it. If you email me directly and give me a better idea of what you have in mind I'll see how I can assist.
Happy programming!!
|
|
|
|
|
thank you all.
i have the problem solved.
thank you again!
|
|
|
|
|
As far as i know that MFC is a wrapper for all the win32apis
My question is CSplitterWindow is wrapper for which apis??
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
As far i know, CSplitterWnd is not a wrapper for any equivalent Win32 API.
Splitter window is a windows with more than one panes or child windows, and where each pane is usually a CView class derived window and thats application specific.
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
My program needs to popup a dialog whenever the user prints to a particular printer. I have the printer driver setup to notify my application when it's being printed to, at which point I display the modal dialog. However, the the problem is the modal dialog is displayed BEHIND the application that is printing.
I tried using the obvious SetForegroundWindow function in the OnInitDialog function, and it then properly displays my dialog on top of all other windows, but only for the first time printing! After that all subsequent prints display my dialog behind the application printing again.
I also tried using SetWindowPos, SetFocus, ShowWindow, BringWindowToTop, and SetActiveWindow but nothing works.
Any ideas???
Rob Geiman
|
|
|
|
|
Post the code with SetWindowPos().
Kuphryn
|
|
|
|
|
::SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Rob Geiman
|
|
|
|