View Full Version : Wont work in vista!
brianp
04-23-2007, 10:00 PM
In windows vista, when you connect the client to the server, it says it cannot find the eqgame process:
NetworkServer: New connectino from 192.168.1.101
MemReader: Failed to locate process 'eqgame'
NetworkServer: Closing client socket
NetworkServer: Closing listener socket
I have tried this with both server 1.20.0 and 1.19.1 and the latest client - 1.19.2, and running it as administrator. I believe it is a problem with vista itself, either the security crap or a difference in how it uses RAM? Anyone have success with vista?
gawker
04-24-2007, 10:24 AM
Each OS stores the process list in a specific location. I believe the server code detects the OS version and then sets the pointer to the process list accordingly. This code has not been updated to detect the new Vista OS and so the process list code is failing.
Seaxouri
04-24-2007, 10:46 AM
The process list is returned via a system API. Not much I can do about it until I get Vista, sorry.
brianp
04-24-2007, 11:28 AM
Myseq is done in C++, right? I have marginal C++ experience (and a lot more in C# and actionscript), but maybe I know enough to fix this for vista, if anyone could give me a nudge in the right direction?
Edit: Ick. I looked at the source code for MemReader. It looks much simpler than I expected, but nevertheless, I don't even know really how it works now, let alone where it would need changed for Vista. I guess I'll wait until one of you who know what you are doing can fix it :)
brianp
04-24-2007, 11:50 AM
By the way, www.newegg.com has the cheapest Vista I have seen yet. I can't say im very pleased with the OS though. So far it seems like nothing essential has improved, and instead a bunch of incompatibilities have cropped up.
bobster
04-24-2007, 10:34 PM
Seems to be an issue with UAC (user access control) and the handling of openProcess.
don't think vista accepts our "enableDebugPrivileges" the same way 9x/xp did.
(No Vista here - so can't check)
brianp - have you tried using the -debug command when running server, and scanning for processes from within, see what you get?
Seaxouri
04-25-2007, 12:15 PM
I hope it does not have anything to do with Protected Processes.
http://msdn2.microsoft.com/en-us/library/ms684880.aspx
http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/process_Vista.doc
My hope is that it is very difficult to create a protected process. If not, I can see a lot of virus writers creating their processes as protected, which would prevent antivirus scanners from detecting viral signatures in these rogue processes. Hopefully Microsoft has thought of this, otherwise we are all in for a treat.
The way I read it, once a process is tagged as 'protected', it is impossible, even thru ACLs to perform certain operations on the process. We, of course, require VM_READ privileges to query the memory of the virutal machine. VM_READ is one of the protected functions in a protected process.
One possible workaround is to prevent the application from running in process protect mode in the first place. I do not know, but I imagine if you "Run As XP/2000" a process in Vista, it might prevent the ability to create a protected process. This is done by right clicking on the application (eqgame.exe) and selecting the proper option under the Compatibility tab.
Did anyone try this?
Seaxouri
04-25-2007, 12:22 PM
It looks like not anyone can create a PP.
http://msdn2.microsoft.com/en-us/library/ms684863.aspx
That is good. I think its still a mistake though. Hopefully virus writers cannot piggy back some other valid 'special signature' and create their rogue processes by claiming they are a 'media process' or one of the valid four.
Carpathian
04-26-2007, 01:47 AM
In Windows Vista you will need to right click on the application and select the option to "Run as Administrator." You only need to do this action on the server application, not the client. After that it should work fine.
If you have a compiler, I have attached the updated/new files you will need to have Windows Vista ask you when you run it as usual. I prefer the second method ;-), but both will work and do the same thing.
EDIT: Please refer to post further down in this thread for a new version of the Vista Hotfix.
Seaxouri
04-26-2007, 07:26 AM
Thanks. I'll roll those in when I can. Will prob need someone to test.
Carpathian
04-26-2007, 12:32 PM
I'm currently runing Windows Vista on my main PC; however, I do not have any group policies that will affect the UAC from allowing me to elevate to an administrator. Having users with a more restricted setup test the application would be good idea. Although, if your account is not allowed to elevate to an administrator, you are pretty much SOL. The only other way to my knowledge would be if eqgame.exe stopped running with elevated permissions, however, I don't see sony doing that anytime ;-). Perhaps there is "dirty workaround," I will see what I can dig up. I've only recently started to get into "proper" coding practices and rules for Vista.
As a side note, I'll write another piece of code which can be added into the enableDebugPrivileges function. It'll allow the software to verify that the process is running in an elevated state. My reasoning for this is that even if we're running with limited elevation (non-administrator), the functions we use will NOT give an error message. Instead it will go off without a hitch, without giving us the desired result we are seeking from their use.
Carpathian
04-26-2007, 11:54 PM
Nevermind about the code check to determine if a process is properly elevated incase the user had a restricted account. I can write the code to do it, but you wouldn't be able to compile it without the Vista SDK anyways. It's no big deal anyways, if you're not getting spawns and you're on Vista, you're probably not elevated ;-).
Carpathian
04-27-2007, 05:10 PM
Here is a more effect method for implementing the manifest file with Visual C++. Since we don't need a resource file, there is no point to adding one. This method passes the manifest file with the linker options through the project settings. Mucho better.
Also, I slightly rewrote the enableDebugPrivileges to be more efficent. There were un-nessicary allocations in the function.
void MemReader::enableDebugPrivileges()
{
// Allows this process to peek into other another processes memory space.
TOKEN_PRIVILEGES tp;
LUID luid;
HANDLE hToken;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES ^ TOKEN_QUERY, &hToken))
{
RTDEBUG("MemReader: OpenProcessToken error: " << GetLastError());
return;
}
if (!LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &luid))
{
RTDEBUG("MemReader: LookupPrivilegeValue error: " << GetLastError());
CloseHandle(hToken);
return;
}
tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = luid;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (!AdjustTokenPrivileges(
hToken,
false,
&tp,
sizeof(TOKEN_PRIVILEGES),
(PTOKEN_PRIVILEGES) NULL,
(PDWORD) NULL))
{
RTDEBUG("MemReader: AdjustTokenPrivileges error: " << GetLastError());
CloseHandle(hToken);
return;
}
CloseHandle(hToken);
}
brianp
04-27-2007, 08:21 PM
All this is a little beyond my programming level. Are you saying these changes should make everything work in vista, regardless of how the account is set up? It is actually for a friend of mine - I don't have Vista myself, so I have no way to tinker with it and really see how his is set up.
Carpathian
04-27-2007, 09:14 PM
All your friend needs to do, if for now if you don't want to recompile the binary (I'm just lazy, and don't like doing this option ;-)), is right click on the server executable and use the "Run as administrator" option. MySEQ should work after that.
brianp
04-27-2007, 10:59 PM
It looks like I might need the windows platform SDK? Heh. My experience with this is practically 0, but it keeps giving me missing file errors for one thing or another.
Seaxouri
04-28-2007, 07:28 AM
I'm fairly sure, from what I've read at other sites, that you need to do this to run EQ itself on Vista, so it should be old hat.
Seaxouri
04-28-2007, 07:32 AM
It looks like I might need the windows platform SDK? Heh. My experience with this is practically 0, but it keeps giving me missing file errors for one thing or another.Um, you will need to be a little more specific. If there is a feedback message, please write it down exactly and relay that here. Just saying what you said doesn't help at all. I feel like telling your friend to 'click twice on that thing to the right'. That should fix it. If it doesn't, then right click on something and pick the top of middle thing, just don't pick the second thing on the first or third tab, because that can wipe your system out.
Yeah, thats what *I* feel like :/.
brianp
04-29-2007, 12:20 PM
"It looks like I might need the windows platform SDK?"
From what you said, I am now assuming that you either don't know what I'm talking about, or I shouldn't need the platform SDK? I downloaded the source code and Carp's hotfix, and tried compiling using a fresh install of Visual C++ lite (free version). When I tried to compile, it gave a single error, that it was missing wsock32.lib. I acquired that and then it wanted another, and another. After wasting my time downloading about 30 of these (.lib and .h files), it finally spewed out about 260 errors that were completely meaningless to me, and I decided I need some version of the windows platform SDK. It was mentioned on several of the sites I found with the missing files.
Carpathian
04-29-2007, 06:22 PM
I can't give you a definite answer, as the version of MSVS (2005 Pro) I use has all of the generic SDKs installed by default. Installing the Windows SDK is probably the first one I would try. It contains the most commonly used libraries (such as windows sockets, wsock32). You can find it on MSDN, http://msdn.microsoft.com. Although, next time it would be very helpful to copy some of the output from the output window. There are so many different things which could go wrong between each person's individual build enviroment, its hard to tell exactly what is wrong without a few hints ;-).
Seaxouri
04-29-2007, 07:54 PM
If your trying to build it, I have complete instructions on in the Developer forum.
http://www.showeq.net/forums/showthread.php?t=5484
Try reading that first.
Yes you need the platform SDK, which is free.
Powered by vBulletin® Version 4.1.11 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.