|
.S.Rod. wrote:
...(at least something that stands for itself in this .NET run-time).
Why Stephane, I haven't noticed your using that "smiley" before.
If I didn't know better, I'd say you are among those of us who have been wrestling with the insanity of the software industry for so long...
"Few are those who see with their own eyes and feel with their own hearts." - A. Einstein
|
|
|
|
|
A last funny pic before tonight's hunting,
|
|
|
|
|
I have to an applicatin that in part of it,it shows .zip files.In windows xp when I right click on zip files,I can choose EXTRACT ALL... option and unzip files.I want when I double click on zip files in my program it extract files,So I think I shoul use Procees.Start() and ProcessStartInfo .By default it only open .zip file with windows explorer so I have to set ProcessStartInfo.Verb property,but I don't know the action.I pass EXTRACT or EXTRACT ALL,and somethings like that but it always thrown exception.Does anybody know how can I find the these Verbs name or any idea about this problem?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I am afraid you are facing a shell extension handler. Exposed functions are called by Windows Explorer on the basis of registered components (see HKCR\.zip and HKCR\Directory\ShellEx for entry points), and use COM plumbering, not the command line.
|
|
|
|
|
Thanks for reply.
.S.Rod. wrote:
COM plumbering, not the command line.
Could you please give me more details?What is COM plumbering?You mean using ShellExecute() function?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
An insight[^] on COM plumbering for this particular Winzip case.
|
|
|
|
|
Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Hi
I am running a small ActiveX Control (.NET UserControl exposed as ActiveX), connecting back to host server. This is an intranet application. And this ACtiveX Control refuses to connect back to host server, unless, I add it to 'Trusted Sites' Zone.
How to add the site automatically to Trusted Sites zone. I a have seen this with GotDotNet Workspace VSS-Like Control MSI Installation. Is'nt it?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
I hope this is not possible. If it is, that's a security flaw.
|
|
|
|
|
If you can access the registry, you can add an entry to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
Rocky Moore <><
|
|
|
|
|
Hi Rocky,
That's cool. But I have the following doubt regarding that. It just says ZoneMap/Domains but how does IE understand what domain it belongs too. Since there are 4 Security Zones right. We want our domain to be put in 'Trusted Sites' Zone.
But I had two sites in my Trusted Sites zone and when I searched for these domains in Registry, they were found at:
My Computer\HKEY_USERS\S-1-5-21-478445148-176170993-1538882281-1205\Software\Microsoft\Windows\CurrentVersion\Internet Settings
I could find subkeys for my sites that I have added as 'Trusted Sites'. But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
Since IE maintains Security Zones on a per-user/per-profile basis, right? Please advise...
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
Thats the SID. Every user account has one. The currently logged on user should be mapped to current user in the registry.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
I could find subkeys for my sites that I have added as 'Trusted Sites'. But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
As Leppie mentioned that is the ID of the user, in the link I provided:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
It is based on the current user so the ID is not shown.
As you see from the folders you already have listed, they have a DWORD '*' which is (in my machine at least) value of 2. They ties to the folder name under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
As long as you have entries in the previous key path (in the Domains), and that value you add under it has the value pointing back to the Zones folder (probably the value of 2), IE will classify that site as trusted.
Rocky Moore <><
|
|
|
|
|
Hi,
I want to read the PRoxy Settings from Microsoft Internet Explorer Control Panel Internet Applet Settings and use it for my System.Net.WebClient.
How and where can I read the Proxy/Port in C# application?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
My suggestion is to decompile the implementation from the System.Net.ProxyRegBlob class (System.dll). (for any reason, this class was made hidden).
Other suggestions :
- import wininet.dll API functions (InternetQueryOption)
- hack the registry (HKCR \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Connections + HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Connections).
|
|
|
|
|
.S.Rod. wrote:
My suggestion is to decompile the implementation from the System.Net.ProxyRegBlob class (System.dll). (for any reason, this class was made hidden).
Here's the source code: Net::ProxyRegBlob Class Reference[^]
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
I'm trying to use a form I created in C# in a VC++ program I am creating. (Descriptive subject, no?) I have the C# compiling into a DLL and ... well that's about as far as I can get. I've done some reseach in the MSDN, and it shows how to use console classes, but nothing about how to use a form created in C#. I don't have the code on this computer, but the method I found I was trying last was using the following code (Close as I can 'member)
#using <mscordb.dll>//However main CLR dll is spelled.
#using "MyCSharpDLL.dll"
using namespace MyCSForm;//I tried it with and without this
//line and it didn't work either way, so I show it.
That's about where I get to. I also try to create an object of the class in the name space using either
MyForm Form1;
OR
MyCSForm::MyForm Form1;
Depending on if I use the "using namespace MyCSForm;" line or not.
I have also tried to using a slightly more complex method, one that is used to load functions from a DLL. I use that method to pull things out of a C++ dll that uses dllexport to say what comes out. That method can load the C# DLL but I can't figure out what I would be trying to load from it. Tried and failed to do the form, and main and even the namespace. None worked. At least I don't know how to get them to work.
Any help would be appreciated and if you have question I will answer them to the best of my abilities. And if I am going all wrong on how to load a DLL made in C# into C++, please point me in the right direction. Thanks.
Note: I'm sorry if I seem to be flooding the forum, but I'm not sure which of the three (Visual C++, Managed C++, C#) I am posting this in would be the best place for it. Since it deals with all three of them, I believe.
Thank you again for any help.
The wisest of the wise may err. - Aeschylus
|
|
|
|
|
You have several options :
- export the C# assembly to a COM component (regasm.exe) and use it from your VC++ program like a normal COM component. This article[^] (Nick Parker) tells how to.
- use MC++ mix mode, where your code references the namespace and class written with C#. #using <MyCSharp.dll> using namespace MyCSForm;, and of course you need to compile with VC++7.x with the /clr switch.
PS : cross-posting is lousy.
|
|
|
|
|
Dear All,
Please guide me how I can run my .NET application stored on another computer in my LAN from a mapped drive.
Regards,
Sassan Komeili Zadeh
|
|
|
|
|
I have a requirement to authenticate users against a non-MS LDAP service using non-standard attributes. The general method of doing this is to search for the user anonymously, then re-bind to the server with the found DN and the provided password.
I'm using the following code to implement the search, but it always fails (error provided below):
<br />
DirectoryEntry me;<br />
string filter = "(mailLocalAddress=" + uid + ")";<br />
string path = "ldap://10.10.240.19/o=Top";<br />
<br />
DirectoryEntry dbE = new DirectoryEntry(path);<br />
DirectorySearcher dsE = new DirectorySearcher(dbE, filter);<br />
dsE.SizeLimit = 2;<br />
SearchResultCollection src = dsE.FindAll();<br />
<br />
if (src.Count == 0) <br />
{<br />
throw new AuthenticationException("Login Incorrect");<br />
}<br />
if (src.Count > 1)<br />
{<br />
throw new AuthenticationException("Invalid LDAP Response");<br />
}<br />
me = src[0].GetDirectoryEntry(); <br />
The error I get is:
<br />
System.Runtime.InteropServices.COMException (0x80040E37): Unknown error (0x80040e37) at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindAll() at Portal.Login.CheckPassword(String uid, String pass) in c:\inetpub\wwwroot\portal\login.aspx.cs:line 108<br />
Now, my base DN is indeed "top". What I am expecting is that the program binds anonymously to the specified LDAP server and does a sub-tree search on o=Top for my filter.
Anyone have any ideas?
-Adrian
|
|
|
|
|
After much searching, I found there is a difference between ldap:// and LDAP:// --- go figure.
|
|
|
|
|
From reading a couple articles on CP and other sources, like this one:
http://www.dotnet247.com/247reference/a.aspx?u=http://www.c-sharpcorner.com/Code/2002/April/MtP4MtVsMt.asp[^]
I have the following understanding about the ThreadPool class that I'd like to verify. And that is, that the ThreadPool manages up to 25 threads (the default limit), but that ONLY ONE THREAD can be executing. In other words, the OS controls the CPU to timeslice between the application thread and ONLY ONE worker thread, regardless of how many the ThreadPool is managing. Is this correct?
For my requirements, I'd like something more akin to this article:
http://www.codeproject.com/useritems/threadlibrary.asp?target=threadpool[^]
which, if I understand it correctly, pre-creates a pool of threads and assigns them to various worker processes that exist in a queue. The assumption here, unlike ThreadPool, is that ALL the threads will be busy doing something, and the application will be creating worker processes (but not threads). The point of this class is to reduce the overhead of constantly creating and destroying threads. Now, I don't think this is what C#'s ThreadPool class does.
Is this view of the ThreadPool class correct?
Thanks!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
Marc Clifton wrote:
Is this view of the ThreadPool class correct?
I think it will create x number of threads then use those for each delegate to run but I'm not sure.
Mike Woodring has a C# implementation of a ThreadPool class available on his website, staff.develop.com/woodring[^] in the .NET samples section. I think he also posted a ton of information about the ThreadPool to one of the DOTNET lists (discuss.develop.com[^]) a long time back. I did a quick search, but didn't find what I was looking for, but you might find the info you want with a quick search.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Wow, what a great site! Thanks for the link!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
Have a look on GotDotNet for ManagedThreadPool. ThreadPool written in 100% managed code. Mimics the core functionality of the System.Threading.ThreadPool class. The author is stoub@microsoft.com.
Perhaps with some tweaking you can get what you want.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|