|
I'd start moving away from the Setup and Deployment project in Visual Studio. It won't exist in the next Visual Studio release. The supported method will be InstallShield (Lite or Express or whatever...)
Windows Installer has supported x64 component since release 2.0. Normally, I'd create a seperate x64 version of the installer. But, depending on what you're doing, you may be able to do something like adding the x64 components (tagged as such) to a seperate feature, then in a CA, check the VersionNT64 property and make a call to SetFeatureState as appropriate to turn on/off its install state, in the InstallExec sequence. And you don't need any .NET code to do this.
You also have to keep in mind a 32-bit installer cannot write to 64-bit registry and file locations...
|
|
|
|
|
Hi, All.
I compiling an assembly programmatically from a .cs file. I can work with it what i need but if i want to reuse it a get "The process can not access the file because it is being used by another process". the message is clear but i cant to dispose or erase or whatever this dll to reuse it.
any idea?
thank you very much.
|
|
|
|
|
Hi,
AFAIK there are two solutions:
1.
when loading and executing a DLL, there is no direct way to unload the DLL, as the app would not trust you to do so while it might still be executing the DLL code. There is a way around this using another AppDomain; you can load DLLs to an AppDomain, and later unload the entire AppDomain. That would free the DLL; however you'd have to cross the AppDomain borders, so this is not the way I do it.
2.
You can compile to memory and run from there. CompilerParameters.GenerateInMemory and CompilerParameters.GenerateExecutable are some relevant porperties.
|
|
|
|
|
Thanks a lot, the CompilerParameters.GenerateInMemory was the solution.
|
|
|
|
|
you're welcome.
|
|
|
|
|
I need to write a code that mimics the control system for a garage forecourt petrol pump. Once the User has selected the required type and volume of fuel the display message will show the following line BEFORE re-displaying the menu with the adjusted volume of that type of fuel....
you selected....litres of fuel type......
enter to continue.
I have only written the code to display the types of fuel but i do not know what code to write that ask the user to type in a number. Do I need to declare a variable??
Console.WriteLine("1 - Four Star Petrol - £1.15 per litre. Volume available...100...litres");
Console.WriteLine("2 - Unleaded Petrol - £1.20 per litre. Volume available...100...litres");
Console.WriteLine("3 - Diesel - £1.25 per litre. Volume available...100...litres\n");
Console.WriteLine("Select 1, 2 or 3 and follow prompt for volume required:");
|
|
|
|
|
Janded wrote: Do I need to declare a variable??
Yes - and then you'll need to read the value into it - if you use Console.ReadKey you can intercept the value the user typed in and check it (it returns a ConsoleKeyInfo structure which you can easily interrogate).
|
|
|
|
|
How about Console.ReadLine ??
|
|
|
|
|
Simple console input here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi, I would like to get the complete code for data enrty using datagridview. I want to insert the data into a table. The columns are
1. Slno (auto ncrementing)
2. A value from a dropdown.
3. A value from master based on column 2 selection
4. Quantity (int)
5. product of col 3 and col 4
after col 4, a new row to be inserted and cursor to got to col 2.
Anybody help !!!
Thanks
|
|
|
|
|
Take a look at some of the articles here on CodeProject, there is certain to be something that will help you.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Try it out on google.
In google search bar try
"DataGridView + <here>"
replace here with your every point and you will get answer of your every point.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
A DataGridView is not an appropriate interface for data input -- create a form for that.
|
|
|
|
|
Consider the NETWORK_SERVICE:
SecurityIdentifier ns = new SecurityIdentifier(WellKnownSidType.NetworkServiceSid, null);
What is the SID for IIS_IUSRS account?
Чесноков
|
|
|
|
|
You should be able to get it with:
SecurityIdentifier iusers = new SecurityIdentifier("S-1-5-32-568");
|
|
|
|
|
Is there a WellKnownSidType. constant for it available?
Чесноков
|
|
|
|
|
|
AFAIK, there are no constants defined anywhere that contain all the wellknown SIDs. However, you can write your own using the data from here[^].
|
|
|
|
|
In the world of ActiveX/COM, the singleton pattern could hardly be implemented: COM requires a public constructor without parameters.
Now I have some third party components which actually should be singletons, as I can see from their behavior. E.g. one of them has an "Initialize" method which crashes when called a second time with a "Reinitialize Error" (and gladly no "Initialized" property, which is a bug which should be fixed by that third party).
In order to work with these components, I decided to write some C# wrapper classes where I could implement the singleton pattern correctly and add some nice features. I did that for one class manually, and it was a real lot of work: write all the functions, properties, and events, and just forward them to the internal COM object.
Since I'd like to create such wrappers for several more classes, I am interested in a tool which could create at least some function stubs. What can you recommend here? Anything which reduces manual work is appreciated.
|
|
|
|
|
Maybe write a utility that will generate the code?
|
|
|
|
|
With Reflection being our friend, that task did not seem too terrifying. But there are lots of caveats: methods for adding/removing event handlers will show up, also the get/set accessors of properties show up as methods, and sometimes a special property "is not supported by the language", and so on... Some manual polishing is still required.
|
|
|
|
|
someone plz suggest a library to receive live video through a camera(not an IP camera).
|
|
|
|
|
That is totally dependent on the hardware you choose to take in the video.
What hardware you using, how is the live content being connected e.g. usb, firewire, analog.....
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
basically i m using a 2.4 ghz analog transmitter for video transmission and a receiver plus a tv card at the receiving end which i think should work the same way as a digital camera.
|
|
|
|
|
Hello, i am in a WPF project, but i need question about C#. I am using System.Drawing.Icon.ExtractAssociatedIcon() to get System.Drawing.Icon . And i want to convert to System.Controls.Image
Can anyone help?
Thank you in advamce.
modified on Sunday, September 26, 2010 10:51 AM
|
|
|
|