473,513 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Active Directory Client Side Extension in C#

Can anyone assist in converting this sample from msdn into c#?

#include <windows.h>
#include <userenv.h>

DWORD CALLBACK ProcessGroupPolicy(
DWORD dwFlags,
HANDLE hToken,
HKEY hKeyRoot,
PGROUP_POLICY_OBJECT pDeletedGPOList,
PGROUP_POLICY_OBJECT pChangedGPOList,
ASYNCCOMPLETIONHANDLE pHandle,
BOOL *pbAbort,
PFNSTATUSMESSAGECALLBACK pStatusCallback
)

{
PGROUP_POLICY_OBJECT pCurGPO;

// Check dwFlags for settings.

// ...

// Process deleted GPOs.

for( pCurGPO = pDeletedGPOList; pCurGPO; pCurGPO = pCurGPO->pNext )
{
if( *pbAbort )
{
// Abort.
break;
}
// ...
}

// Process changed GPOs.

for( pCurGPO = pChangedGPOList; pCurGPO; pCurGPO = pCurGPO->pNext )
{
if( *pbAbort )
{
// Abort.
break;
}
// ...
}

return( ERROR_SUCCESS );

}
Nov 16 '05 #1
4 1766
Hi Clay,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
Hi Clay,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to convert the c++ call of AD
Client side extension to C#. If there is any misunderstanding, please feel
free to let me know.

Based on my research, I found this function is for the extension DLL and
call back the main process from function table. I don't think can be called
from managed code, it shall be unmanaged code. So I suggest we can use COM
to wrap and COM interop to do.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
Yes you are correct, I want to basically just reproduce the sample in C# and
then I can start building on it. So I can't have the c# function call back
to the main process in managed code?

Clay Wilcox
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:7B*************@cpmsftngxa10.phx.gbl...
Hi Clay,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to convert the c++ call of AD
Client side extension to C#. If there is any misunderstanding, please feel
free to let me know.

Based on my research, I found this function is for the extension DLL and
call back the main process from function table. I don't think can be called from managed code, it shall be unmanaged code. So I suggest we can use COM
to wrap and COM interop to do.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #4
Hi Clay,

Yes, I think so. Please try to use interop with COM wrapper.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3692
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
9
388
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
0
1331
by: Matt | last post by:
Hi, I am looking for an Active Directory object selection for ASP.net 2. My ASP.net page has a text field to enter a user's or computer's LDAP path directly. And a "Find..." button that shall...
0
5397
by: Chung Leong | last post by:
In this brief tutorial I'll describe how you retrieve information from an Active Directory through the OLE-DB extension. While it is possible to use the LDAP extension to achieve the same goal, as...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.