Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
86 user(s) are online (32 user(s) are browsing Forum)

Members: 0
Guests: 86

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +5€

Current balance: -60€
(last updated 10/2020)

Please make a donation if you want to help keeping The-Starport online:

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 52 users playing Freelancer on 42 servers.
December. 6, 2020

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



How to address "ERROR: Exception in HkCb_SendChat"?
Home away from home
Joined:
2009/7/30 4:40
From P.R.C
Group:
Registered Users
Senior Members
Posts: 849
Offline
This happned when I implementing user command functions for my plugin.

That I did is just simplely hook
Code:
PLUGIN_UserCmd_Process
,
Code:
PLUGIN_UserCmd_Help
and
Code:
PLUGIN_ExecuteCommandString_Callback
like this:

Code:

p_PI->lstHooks.push_back(PLUGIN_HOOKINFO((FARPROC*)&UserCmdProcess, PLUGIN_UserCmd_Process, 0));
p_PI->lstHooks.push_back(PLUGIN_HOOKINFO((FARPROC*)&UserCmdHelp, PLUGIN_UserCmd_Help, 0));
p_PI->lstHooks.push_back(PLUGIN_HOOKINFO((FARPROC*)&UserCmdCallback, PLUGIN_ExecuteCommandString_Callback, 0));


Processers:
Code:

void __stdcall UserCmdHelp(uint iClientID, const wstring &wscParam)
{
// Empty indeed
}

bool __stdcall UserCmdProcess(uint iClientID, const wstring &wscCmd)
{
returncode = DEFAULT_RETURNCODE;
return false;
}

bool __stdcall UserCmdCallback(CCmds* cmds, const wstring &wscCmd)
{
returncode = DEFAULT_RETURNCODE;
return false;
}


And after that, I got following errors:
Code:

[02.03.2015 13:35:36] ERROR: Exception in HkCb_SendChat
[02.03.2015 13:35:36] Code=c0000005 Offset=837d Module="E:\Games\Freelancer\EXE\FLHook.dll"
[02.03.2015 13:35:36] eax=0 ebx=2a6380 ecx=32562800 edx=0 edi=0 esi=6d8e5a8 ebp=727e4e4 eip=5b1837d esp=727d6b4
[02.03.2015 13:35:36] Attempting to write minidump...
[02.03.2015 13:35:36] Minidump './flhook_logs/debug/flserver_02.03.2015_13.35.36-1.dmp' written.
[02.03.2015 13:35:53] ERROR: Exception in HkCb_SendChat
[02.03.2015 13:35:53] Code=c0000005 Offset=837d Module="E:\Games\Freelancer\EXE\FLHook.dll"
[02.03.2015 13:35:53] eax=0 ebx=2a6380 ecx=32562800 edx=0 edi=0 esi=6d8e5a8 ebp=727e4e4 eip=5b1837d esp=727d6b4
[02.03.2015 13:35:53] Attempting to write minidump...
[02.03.2015 13:35:53] Minidump './flhook_logs/debug/flserver_02.03.2015_13.35.53-1.dmp' written.
[02.03.2015 13:36:38] ERROR: Exception in HkCb_SendChat
[02.03.2015 13:36:38] Code=c0000005 Offset=837d Module="E:\Games\Freelancer\EXE\FLHook.dll"
[02.03.2015 13:36:38] eax=0 ebx=2a6380 ecx=32562800 edx=0 edi=0 esi=6d8e5a8 ebp=727e70c eip=5b1837d esp=727d8dc
[02.03.2015 13:36:38] Attempting to write minidump...
[02.03.2015 13:36:38] Minidump './flhook_logs/debug/flserver_02.03.2015_13.36.38-1.dmp' written.


Noice these exceptions maybe just indicates I calling HkKill etc with client 0, which is not existed, so it's wrong. But all functions is works normally before I did the user command related hook things, so I thought it must to do with those hooks. But I just can't address the problem. Maybe I did something in wrong way?

Please help, Thanks!

Posted on: 2015/3/2 5:57
Sorry for my poor english...
Top
Re: How to address "ERROR: Exception in HkCb_SendChat"?
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
remove the _stdcall before the function UserCmdHelp, UserCmdProcess and UserCmdCallback. Its not stdcall. Look at the function in Hook source and reference it the same way as its called there.

Posted on: 2015/3/2 18:48
Open in new window
Top
Re: How to address "ERROR: Exception in HkCb_SendChat"?
Home away from home
Joined:
2009/7/30 4:40
From P.R.C
Group:
Registered Users
Senior Members
Posts: 849
Offline
You are totally right. And problem fixed, I'm happy now

Thank you!

Posted on: 2015/3/3 6:19
Sorry for my poor english...
Top