|
Richard MacCutchan wrote: On the contrary, the actual program will not start.
The actual program WILL start and execute a native bootstrap that loads the mscoree.dll (which is Framework version agnostic). It is this dll that actually checks if the supported Runtime is installed and displays a message box if it is not installed.
Richard MacCutchan wrote: the point being that the user code will never get control in order to 'see' this problem.
Agree.
|
|
|
|
|
So the program still never gets started, the only thing that gets any control is the framework that is wrapped round the app. My point was to show that the user code has no way of checking whether a required feature is present or not. Which, after all, is what the questioner is asking about.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
FrameWork was just an example.
|
|
|
|
|
And I gave the answer based on that information. If you wish to discuss some other issue then maybe you could explain further.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
The only way to do it is to write a native code pre-loader which checks the requirements you specify and only starts your porgram if they are met. But you can't do that in C# or any other .NET language as Richard has already said - you would need to use C or C++ most likely.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
|
As I mentioned before, FrameWork was just an example. In general, how is it possible to check that a dll which is not even famous, is running or not?
|
|
|
|
|
DLLs do not 'run', they are loaded by the system when an application attempts to call a function within the DLL. Alternatively an application can load the DLL and make 'unlinked' calls to functions using the LoadLibrary() [^] and associated functions. This is true in native applications but I'm not sure that it is particularly straightforward in .NET based applications.
Perhaps a clearer explanation of what you are trying to achieve would help.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You are right, assume that a program wants to check out a printer driver is loaded or not?
|
|
|
|
|
|
Well, as Paul explains, you can enumerate all sorts of information in C++, which probably means you need to learn about P/Invoke[^]. However, you still have not explained what you are trying to achieve.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Based on your other responses your question is imprecise.
There are many things that at application either requires or desires.
The impact on the application on those depends on the nature of the item itself.
As an extreme example if you have compiled windows binary it will not run on a BASIC-STAMP. It is also ridiculous to even consider that case.
The needs can be broken into the following
1. It will always be on the target system
2. It will often be on the target system
3. It will sometimes be on the target system.
What your application does based on the above depends on the need. Choices are.
1. Do not run.
2. Run but do not enable certain functionality.
3. Run and provide default functionality.
4. Inform the user and ask them to install the functionality.
You can attempt to minimize problems by creating an appropriate installer. The nature of that installer depends on the decisions related to the above. But in general the installer must check for the specific functionality and then install it. How it does that still depends on the nature of the resource though.
And all of the above also is impacted by the license of the specific resources.
|
|
|
|
|
I wouldn't bother; I'd just write the app normally and if something is missing it will throw an Exception.
For instance, if my app tries to use the ACE engine to query an Access or Excel file, if ACE isn't present I get an Exception explaining this.
|
|
|
|
|
Guys i was working on my project. but had a brownOut(or Sag).. my computer went off. wen i try rebooting it, and try to reload the project i was working on, it returns a message saying *.csproj could not load properly... and when i follow the file path, the file is there, and when i tried to compered it with .csproj of other projects i see no differnce that could lead to this..
please help me out.
modified 14-Sep-12 10:58am.
|
|
|
|
|
It appears the .csproj file or the solution file has been corrupted somehow.
There's ahidden .suo file in the solution folder. In Explorer, open the folder containing your .sln file and turn on the options for seeing hidden files. Then delete the .suo file and reopen your solution.
If that doesn't work, you can always create a new empty project identical to the one you created before that is now corrupt and just add the code files to it.
|
|
|
|
|
thanks alot, it's working now
|
|
|
|
|
Hi
I want to enable Browser Helper objects (BHO) and Toolbars in Internet Explore using c# window Application. To enable BHO and Toolbars a value has to be created in "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Approved Extensions" Key. Name of the value is Id of BHO/Toolbar. I want to know what data is set in that value and how it is generated.
More over are there any classes or interfaces provided for internet explorer which can be used to do the need full.
Any help would be great.
Thanks in Advance
abhinav
|
|
|
|
|
Does this[^] article help?
/ravi
|
|
|
|
|
Hello Ravi,
Thanks for your guidence, but actually what I want is to enable or diable existing BHO in IE as we are making an Browser add-on manager.
When existing BHO is enabled or disabled its entry is modified in
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Approved Extensions
but we are not able to understand the value data information inside it. If you can put any light on it, It would be a great help.
abhinav
|
|
|
|
|
http:
It is 100 % Brand New, high quality Compatible with Apple iPhone 4 4S
http:
It is Anti-Slip: NO NEED to worry about slipping iPhone off your hands
It is Made of durable impact resistant polymer, Skidproof and Deluxe."
|
|
|
|
|
How to get multiple inputs in textbox at run time and how it will display output in listbox
|
|
|
|
|
Could you please elaborate on what you mean by "get multiple inputs in textbox at run time".
|
|
|
|
|
i want to store multiple inputs at run time in the text box and displays the output in listbox...
for this am using for loop to get multiple inputs and how can i store it???
i placed two text boxes , one for getting name and other for age... am going to give multiple persons name and age and am going to display it in list box... what shall i do for this????
|
|
|
|
|
Still don't get what it is you want to achieve.
You have two textboxes: one representing a name and the other represents age. You want to display the name and the age in a listbox - I assume this is not causing you any problems? You say you have a for-loop "to get multiple inputs". What do you mean by this? Perhaps you better post the code that doesn't work..
|
|
|
|
|
Drop the loop. Use a Button instead. Label it "Add". On a user's click on your AddButton, copy the current values of your input fields to the ListBox. Then clear the input fields and set focus on the first one.
That way, users can type in names and click on the AddButton as often as they want.
If you want to restrict the number of rows added to the ListBox, then you can implement that in your AddButton_Click method, too.
Ciao,
luker
|
|
|
|