03-23-2007, 05:01 AM
|
#5 (permalink)
|
| Likes to customize RE! Join Date: Jul 2006 Location: London, UK
Posts: 350
Rep Power: 3  | I tried the example using VB.NET and it failed. I got an error message on the OLEInitialize function. I rewrote the code so that it matched the C#'s declaration and it worked fine. Code: Module Module1
Public Declare Function OLEInitialize Lib "ole32" Alias "OleInitialize" (ByVal intp As IntPtr) As Integer
Sub Main()
OLEInitialize(Nothing)
Dim oREAPI As New REDotNetAPI.REAPI
Dim oConstit As REDotNetAPI.CRecord
oREAPI.Init("WRE11111", , , 50, , REDotNetAPI.AppMode.amStandalone)
oConstit = New REDotNetAPI.CRecord()
oConstit.Init(oREAPI.SessionContext)
oConstit.LoadByField(REDotNetAPI.bbRECORDUniqueFields.uf_Record_CONSTITUENT_ID, 3)
System.Console.Write(oConstit.Fields(REDotNetAPI.ERECORDSFields.RECORDS_fld_FULL_NAME))
oConstit.CloseDown()
oConstit = Nothing
End Sub
End Module
Note that this was written using a pre-7.80 version i.e. before RE included the interop assemblies so the namespace "REDotNetAPI" may be different on later versions.
David |