Hi,
i want to add an extern associated account to an mailenabled ad
object. everthing works fine (i'm working with vb.net 2008 express)
but saving produces an error.
both lines:
objExMbx.Invoke Set("msExchMast erAccountSID", RawSid)
objExMbx.Invoke Set("msExchMail boxSecurityDesc riptor", objSD)
lead to an exception (in german)
Unbehandelte Ausnahme: System.Reflecti on.TargetInvoca tionException:
Ein Aufrufziel hat einen Ausnahmefehler verursacht.
---System.Runtime. InteropServices .COMException (0x80004005): Beim
Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL
-Fehler zurückgegeben.
--- Ende der internen Ausnahmestapelü berwachung ---
bei System.Director yServices.Direc toryEntry.Invok eSet(String
propertyName, Object[] args)
bei SetMSExternalAc count.Main.Main () in C:\Dokumente und
Einstellungen\u ser\Eigene Dateien\Visual Studio 200
8\Projects\SetM SExternalAccoun t\SetMSExternal Account\Module1 .vb:Zeile
300.
RawSid is "Dim RawSid as IntPtr" and the sid is converted via
ConvertStringSi dToSid
Declare Auto Function ConvertStringSi dToSid Lib "advapi32.d ll" ( _
ByVal StringSid As String, _
ByRef Sid As IntPtr) As Long
and objSD is "Dim objSD As ActiveDs.Securi tyDescriptor"
i checked the contents of the SD which is:
NT-AUTORITÄT\SELBS T, 131075, 0, 2, 0, ,
NT-AUTORITÄT\SELBS T, 131075, 0, 2, 0, ,
TOPTEST\user, -2147418107, 0, 0, 0, ,
and is correct. where am i wrong?
Regards, Dirk
i want to add an extern associated account to an mailenabled ad
object. everthing works fine (i'm working with vb.net 2008 express)
but saving produces an error.
both lines:
objExMbx.Invoke Set("msExchMast erAccountSID", RawSid)
objExMbx.Invoke Set("msExchMail boxSecurityDesc riptor", objSD)
lead to an exception (in german)
Unbehandelte Ausnahme: System.Reflecti on.TargetInvoca tionException:
Ein Aufrufziel hat einen Ausnahmefehler verursacht.
---System.Runtime. InteropServices .COMException (0x80004005): Beim
Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL
-Fehler zurückgegeben.
--- Ende der internen Ausnahmestapelü berwachung ---
bei System.Director yServices.Direc toryEntry.Invok eSet(String
propertyName, Object[] args)
bei SetMSExternalAc count.Main.Main () in C:\Dokumente und
Einstellungen\u ser\Eigene Dateien\Visual Studio 200
8\Projects\SetM SExternalAccoun t\SetMSExternal Account\Module1 .vb:Zeile
300.
RawSid is "Dim RawSid as IntPtr" and the sid is converted via
ConvertStringSi dToSid
Declare Auto Function ConvertStringSi dToSid Lib "advapi32.d ll" ( _
ByVal StringSid As String, _
ByRef Sid As IntPtr) As Long
and objSD is "Dim objSD As ActiveDs.Securi tyDescriptor"
i checked the contents of the SD which is:
NT-AUTORITÄT\SELBS T, 131075, 0, 2, 0, ,
NT-AUTORITÄT\SELBS T, 131075, 0, 2, 0, ,
TOPTEST\user, -2147418107, 0, 0, 0, ,
and is correct. where am i wrong?
Regards, Dirk