|
Has anyone outside the US managed to get C# / DX9 to work together?
I've installed the full SDK and opened VS.NET. Clicked on New Project, sure enough, there's a new template: DirectX 9 Visual C# Wizard. Assumedly I need to use that, right?
When I select this and hit OK, I get a blank window and a messagebox (hidden underneath it) saying "Navigation Failed. Cannot find D:\Program Files\Microsoft Visual Studio .NET\VC#\VC#Wizards\Mdx9AppWizard\HTML\1033\default.htm".
Well, fair enough, it isn't there. 1033 is the Locale ID for English US; the installer has chosen to only install 2057 (English UK), because that's what my system is set to.
But every reference in the registry is ...HTML\2057 so is this hardcoded somewhere? Is there another way to use DX9 without the wizard? Who do you complain to about something like this if it fails?
Any ideas anyone?
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I think I've actually answered part of my own question. It seems that you can simply reference the DX assemblies in any Win app and use them from there.
I still wouldn't mind knowing if there's a workaround to get the wizard going though.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
Dont think I can help you much but it works fine for me...
Why waste time learning when ignorance in instantaneous
-Hobbes
|
|
|
|
|
I would expect it to work in the US, or on any machine with a Locale of 1033. Then it will install in the place where the (assumedly) hardcoded folder path is.
I suppose one workaround would be to change all my folder paths to 1033 and rename the physical folder, but that's naaaassssty! I'd rather do without the wizard... I think. )
As you have it working, maybe you CAN help? What does the wizard actually do? Is it worth me caring about or is it something I can do manually in a few seconds?
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
Well, have you ever used the DX wizard for VC6? It does the same thing pretty much, it sets up all the base code for a simple DX app; adding all the references etc. I don't know if you would be able to do it in a few seconds... maybe a few minutes but its convenient to have.
Paul Riley wrote:
I'd rather do without the wizard... I think
Considering all the work you would have to do to get the wizard working you are probably right!
Why waste time learning when ignorance in instantaneous
-Hobbes
|
|
|
|
|
Thanks, Brian. Doesn't sound too bad, I'll have to try it over the weekend, been playing with the samples tonight.
This is seriously sloppy on MS's part though. If you're going to have the wizard work for every language (to the point of separating English US/UK), you'd think they'd bother to test it in at least one other language
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I had the same problem because my local is Frech Canada. I have rename all the locale folder to 1033(US) and the wizard worked. But you can make a direct reference to DirectX also(like I do).
Trully, if there evil in this world, It lies within the heard of mankind
Shock The Dark Mage
shock@romhack.net
Main Project: Aeru IRC - http://www.sf.net/projects/aeruirc
|
|
|
|
|
Thanks, Shock. At least reassuring to confirm that I've not just missed something really obvious
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
create a junction...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I hade the same problem and solved it like this:
In the extracted files, locate and copy the folder .\Bin\DXUtils\Visual Studio 7.0 Wizards\C#\VC#Wizards\Mdx9AppWizard
Go to \Program Files\Microsoft Visual Studio .NET\VC#\VC#Wizards and delte the folder named Mdx9AppWizard and then paste the one you copied from the extracted files...
This made it work for me...
Andreas Philipson
|
|
|
|
|
Clever trick.
As it turned out, I renamed the folders... it turned out there were only four folders to "fix" and the registry entries were all MRU (Most Recently Used) references, created from my investigating the problem, so they were irrelevant.
Then having done that, I figured out that I was better off copying and adjusting necessary chunks of code from the samples, rather than using the wizard.
I wasn't all that keen on all the unnecessary classes that the wizard was creating.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
In C#,
I did the interop to bring the COM IMoniker interface into C#, and then I made a C# class that implements IMoniker. I made an instance of the class I made, and then I casted it to get an IMoniker.
I then called a com method, IPersistMoniker.Load, and passed it my IMoniker object. I get a generic error, System.ExecutionEngineException.
I'm guessing that the problem has something to do with going "the other way" with com interop- that I'm passing my interface from managed C# into the COM method. Am I right?
What do I have to do to the C# object to make COM digest it, is there just one of those [] things I put ontop of the c# object?
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I'm by no means a COM expert, but did you call regasm so that COM knows where to find your code?
If that doesn't work, I'd suggest asking on the microsoft.public.dotnet.frameworks.interop newsgroup.
|
|
|
|
|
Bog wrote:
I then called a com method, IPersistMoniker.Load, and passed it my IMoniker object. I get a generic error, System.ExecutionEngineException
If I remember correctly, MS reps have said that if you *ever* get an ExecutionEngineException it is considered a bug in the framework. Hopefully our resident MS dev will come by again soon
I'm not a COM guru so I'll just leave it at that then waste your time.
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
thank you, you didn't waste my time at all- knowing that this might not be my fault and could be a bug in the framework is VERY helpful. it means i can go do other stuff rather than banging my head on the screen.
thanks
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
how can i close a application from within a seperate .exe when the seperate .exe is done doing its tasks.
(exsample: a update program is what im shooting for. it is a compiled .exe but when the downloads are complete i want to close the program it is going too update from within the update program itself. does System.Diagnostics have a close funtion or something?)
|
|
|
|
|
Do not know if the C# libs have such a command but you could use the Windows API to do the same. Sending a WM_CLOSE to the window of the other application is one way.
This could be of help. If C# does have a function, It will probably be calling some Windows API. Just a hunch.
http://support.microsoft.com/default.aspx?scid=KB;en-us;q178893
|
|
|
|
|
so i need to get the proccess id of the application i want to shut down ? then what... is that in the System.Diagnostics class. i found ProcessModule.EntryPointAddress could i find the process id from that? or is it in ProccesModule.EntryPointAdress
|
|
|
|
|
See this example on CP
http://www.codeproject.com/csharp/runninginstanceie.asp
It will show you how to enumerate through windows and then how to close them. The example talks about IE windows, you will need to search for the window with your processID rather than a module name of IEXPLORE. Hope this helps.
|
|
|
|
|
I think you can use the System.Diagnostics.Process class. It has a method that will allow you to get the process id of an application based on its window caption. Then you can shut down that process.
|
|
|
|
|
Ranjan Banerji wrote:
This could be of help. If C# does have a function, I will probably be calling some Windows API. Just a hunch.
You would need to use P/Invoke to send the WM_CLOSE message in C#. You will need the handle to the current running executable for this as well.
public const int WM_CLOSE = 0x0010;
[DllImport("user32.dll",CharSet=CharSet.Auto)]
static public extern long SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
I have a property in a class, lets pretend that its called Foo.Message . Now i only want the class [or classes derived from] Bar to be able to get/set the property, but i want all other classes to be able to get the property. can this be done?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Nnamdi Onyeyiri wrote:
Now i only want the class [or classes derived from] Bar to be able to get/set the property, but i want all other classes to be able to get the property. can this be done?
Nope
For some reason MS decided not to let the get/set methods have different visibility modifiers.
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
Damn. I think im gonna pay a visit to Redmond
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
i created a class that i use as a display when errors occure in my program (in place of the messageboxclass). my question is how can import let alone play the standard messagebox sounds (like for question,asterisk,error,ect).
thanks alot.
jesse m
|
|
|
|