Help with converting active directory change notification code from C++ to C#

Help with converting active directory change notification code from C++ to C#

Post by xinhuan » Wed, 02 Jul 2003 20:29:01


You may want to take a look at System.DirectoryService namespace first.
That's the managed library of directory services.

If that doesn't help and you really need to use the unmanaged APIs, you can
use the PInvoke service described at
( http://www.yqcomputer.com/
ddllfunctions.asp).

There's also a hands-on tutorial for PInvoke at
< http://www.yqcomputer.com/
px>.

If you meet any further specific problems, you can post here and we are
here to help.

Regards,
Xin

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. (c) 2003 Microsoft Corporation. All
rights reserved.
 
 
 

1. Active Directory change notifications in C@

2. Need help converting C# code to VB.NET code...

I downloaded a web timer control from
http://www.yqcomputer.com/ 's written in C#. The
code and .DLL comes with the download so I'm trying to convert the sample
which was written in C# to VB (ASP.NET). Here is the following code in the
Default.aspx page...

private void PgTimer1_Elapsed(object sender, System.EventArgs e)
{
if (Application["PgTimer"] == null)
{
Application["PgTimer"] = 0;
}

string strResult = "Elapsed Event: " + DateTime.Now.Millisecond;
Application["PgTimer"] = (int)Application["PgTimer"] + 1;

Response.Write("Instance: " + Application["PgTimer"].ToString() + ": " +
strResult);
}

Can anyone help me convert this to its VB.NET equivalent?

Here is what I have so far...

Private Sub PgTimer1_Elapsed(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PgTimer1.Elapsed
Dim strResult As String
Dim intNum As Integer

strResult = "Elapsed Event: " & DateTime.Now.Millisecond

' The following line is just a placeholder only until I figure out
' how to convert the following C# code.
'
' Application["PgTimer"] = (int)Application["PgTimer"] + 1;
intNum += 1

Response.Write("Instance: " & intNum.ToString() & ": " + strResult)
End Sub

3. Decompiler idea: convert asm to .net byte code, then convert further to C# code.

4. Retrieving the groups of an Active Directory user using unmanaged C++ code

5. Decompiler idea: convert asm to .net byte code, then convert further to C# code.

6. How to convert C++ code to C#

7. Converting c++ iostream and strstream code to c#

8. convert c# code to c++/c

9. Converting C# code to Native (unmanaged) C++

10. Converting C++ code to C#

11. Require C++ Sweep Test code converted to C#?

12. C# - Help with a query against Active Directory

13. convert C++ to C# or using managed C++ with VB.Net

14. Need help converting C++ to C# (COM with VARIANT/SAFEARRAY paramet

15. Help converting C++ interface declare to c#