Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ComponentModel.Win32Exception #47

Closed
finwen opened this issue Jan 3, 2016 · 4 comments
Closed

System.ComponentModel.Win32Exception #47

finwen opened this issue Jan 3, 2016 · 4 comments

Comments

@finwen
Copy link
Contributor

finwen commented Jan 3, 2016

processFilename = processes[0].MainModule.FileName;

Cant access 64 bit programs.

Solve by making EDDiscover 64 bits maybee?

@gregmalcolm
Copy link
Contributor

I take it you mean have a 32 bit and 64 bit offering and let the installer
choose? Some folks play elite on 32 bit OS.

I'll have a looksie in a bit to see if If I can find any other solutions.
On Jan 3, 2016 1:02 PM, "Robert Wahlström" notifications@github.com wrote:

processFilename = processes[0]MainModuleFileName;

Cant access 64 bit programs

Solve by making EDDiscover 64 bits maybee?


Reply to this email directly or view it on GitHub
#47.

@finwen
Copy link
Contributor Author

finwen commented Jan 3, 2016

Via process id we can do

private string GetMainModuleFilepath(int processId)
{
string wmiQueryString = "SELECT ProcessId, ExecutablePath FROM Win32_Process WHERE ProcessId = " + processId;
using (var searcher = new ManagementObjectSearcher(wmiQueryString))
{
using (var results = searcher.Get())
{
ManagementObject mo = results.Cast().FirstOrDefault();
if (mo != null)
{
return (string)mo["ExecutablePath"];
}
}
}
return null;
}

@gregmalcolm
Copy link
Contributor

That sounds promising! It's been a long time since I've had to do this, but
that sounds like the kind of trick involved. Though I've done this more
with VB6 and C++ based apps.
On Jan 3, 2016 5:08 PM, "Robert Wahlström" notifications@github.com wrote:

Via process id we can do

private string GetMainModuleFilepath(int processId)
{
string wmiQueryString = "SELECT ProcessId, ExecutablePath FROM
Win32_Process WHERE ProcessId = " + processId;
using (var searcher = new ManagementObjectSearcher(wmiQueryString))
{
using (var results = searcher.Get())
{
ManagementObject mo = results.Cast().FirstOrDefault();
if (mo != null)
{
return (string)mo["ExecutablePath"];
}
}
}
return null;
}


Reply to this email directly or view it on GitHub
#47 (comment)
.

@robbyxp1
Copy link
Contributor

robbyxp1 commented Jan 4, 2016

Hi,

Commander Robby here (Robbyp on the forums).

I just downloaded it and compiled it, with some idea to see if I can help you in some way in the future ;-)

I'm having the same problem when I compiled it, just about to write a note on the forum then remembered I can report it this way.

Looking at the code, EDDirectory is only used in conjunction with editign AppConfig.xml, right? So it does not matter if you manually update AppConfig.xml.

There is a typo in line 998 of EDDiscoveryForm.cs, "Remeber".

I tried a 64 bit build, but it gives:

1>------ Build started: Project: EDDiscovery, Configuration: Debug Any CPU ------
1>C:\Code\EDDiscovery-master\EDDiscovery\Trilateration\Trilateration.cs(1,7,1,13): error CS0246: The type or namespace name 'Noesis' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Code\EDDiscovery-master\EDDiscovery\Trilateration\Trilateration.cs(781,17,781,34): error CS0246: The type or namespace name 'JavascriptContext' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Code\EDDiscovery-master\EDDiscovery\DB\VisitedSystemsClass.cs(69,21,69,27): warning CS0108: 'VisitedSystemsClass.Update()' hides inherited member 'VisitedSystemsClass.Update()'. Use the new keyword if hiding was intended.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've not done any more digging into that.

Cheers

@finwen finwen closed this as completed Jan 5, 2016
finwen pushed a commit that referenced this issue Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants