Click here to Skip to main content
15,899,754 members
Home / Discussions / COM
   

COM

 
AnswerRe: GetRecordInfoFromGUID returns 0x80029C4A Pin
Vibhash Jha3-May-06 2:35
Vibhash Jha3-May-06 2:35 
GeneralRe: GetRecordInfoFromGUID returns 0x80029C4A Pin
morenz3-May-06 23:06
morenz3-May-06 23:06 
QuestionCOM - ROT - Threading - moniker - RPC - Where is the problem? Pin
guestcat1-May-06 22:47
guestcat1-May-06 22:47 
Questionhow to make a transform filter with one input and two out puts in directshow Pin
Ch Mazhar Iqbal1-May-06 21:15
Ch Mazhar Iqbal1-May-06 21:15 
QuestionATL Exe server.. Pin
Siva Sankar Koyi1-May-06 18:37
Siva Sankar Koyi1-May-06 18:37 
AnswerRe: ATL Exe server.. Pin
Vibhash Jha3-May-06 2:45
Vibhash Jha3-May-06 2:45 
AnswerRe: ATL Exe server.. Pin
morenz3-May-06 23:31
morenz3-May-06 23:31 
QuestionCOM Interop not working with VB.NET Pin
brwrob1-May-06 12:00
brwrob1-May-06 12:00 
Hi

I have created an application the interacts with maximizer CRM, everything was going as planned until i found one line of code that simply does not execute in the .NET environment.

This line of code is meant to tell the COM Object to search for a client by using their ID number, i found that if i execute this line of code in a VB6 project (just like i have been doing in VB.NET) it actually works, this is a bit of a pain as i have to create a separate VB6 .dll that will execute one line of code for my VB.NET application.

Does anyone know how i can solve this problem and execute the line of code successfuly in .NET?
I have added the two functions, first being the VB6 Function, second being the VB.NET Function

Regards
Robert Brown


This is the VB6 Code

Sub Find(ByVal ClientID As String, ByVal ContactNumber As Integer, ByVal List As Integer)<br />
' --------------------------------------------------------<br />
' Function:         Main<br />
' Description:      Examples use of SearchByClientId Method<br />
'<br />
' Arguments:        sClientId: Local variable which receives<br />
'                            getfieldvalue return value.<br />
' Returns:          n/a<br />
'<br />
' Comments:         Maximizer should be active while<br />
'                   running this code.<br />
' --------------------------------------------------------<br />
<br />
Dim objMaxAttach As New MaximizerTLB.AttachToCurrentInstance    ' Define CurrentInstance object of running Maximizer<br />
Dim objMaxCur As MaximizerTLB.CurrentRecord  ' Define Current Record Object variable<br />
<br />
Set objMaxCur = objMaxAttach.GetCurrentRecordObject   ' Set objMaxCur to Current Record<br />
<br />
' -------------------------------------------------------------<br />
' Use the GetFieldValue method to obtain the current record Id<br />
' then search for all matching records<br />
' -------------------------------------------------------------<br />
'sClientId = objMaxCur.GetFieldValue("IDentification")<br />
<br />
' ------------------------------------<br />
' Create new list whose IDentification<br />
' matches that of the current record.<br />
' ------------------------------------<br />
'Call objMaxCur.SearchByClientId(sClientId, 0, 2)<br />
<br />
<br />
<br />
<br />
'***************** this line does not execute in VB.NET ****************<br />
Call objMaxCur.SearchByClientID(ClientID, ContactNumber, List)<br />
'***************** this line does not execute in VB.NET ****************<br />
<br />
<br />
<br />
Set objMaxCur = Nothing ' Release object<br />
Set objMaxAttach = Nothing   ' Release Object<br />
<br />
End Sub


VB.NET Code

Public Sub AddIndividualNote(ByVal ClientID As String, ByVal ContactNumber As String, ByVal Message As String, ByVal BatchID As String)<br />
        Dim objMaxAttach As New MaximizerTLB.AttachToCurrentInstance<br />
        Dim objMaxCurrentRecord As MaximizerTLB.CurrentRecord<br />
<br />
        Try<br />
            objMaxAttach.GetApplicationObject.ActivateWindow("Client")<br />
            objMaxCurrentRecord = objMaxAttach.GetCurrentRecordObject<br />
<br />
<br />
<br />
'***************** this line does not execute in VB.NET ****************<br />
            'search for the person<br />
            objMaxCurrentRecord.SearchByClientID(ClientID, ContactNumber, 2)<br />
'***************** this line does not execute in VB.NET ****************<br />
<br />
<br />
<br />
            objMaxCurrentRecord.UndoSearch()<br />
        Catch ex As Exception<br />
            Throw ex<br />
        Finally<br />
            objMaxCurrentRecord = Nothing               'release object<br />
            objMaxAttach = Nothing                      'Release Object<br />
            GC.Collect()<br />
        End Try<br />
    End Sub

Questionsearching Microsoft MAPI Control 6.0 Pin
Vasya - dragon27-Apr-06 1:55
Vasya - dragon27-Apr-06 1:55 
QuestionOffice CommandBar Button Pin
HakunaMatada26-Apr-06 3:44
HakunaMatada26-Apr-06 3:44 
AnswerRe: Office CommandBar Button Pin
Michael Dunn26-Apr-06 8:02
sitebuilderMichael Dunn26-Apr-06 8:02 
GeneralRe: Office CommandBar Button Pin
HakunaMatada26-Apr-06 17:36
HakunaMatada26-Apr-06 17:36 
GeneralRe: Office CommandBar Button Pin
HakunaMatada26-Apr-06 19:00
HakunaMatada26-Apr-06 19:00 
GeneralRe: Office CommandBar Button Pin
Stephen Hewitt26-Apr-06 21:18
Stephen Hewitt26-Apr-06 21:18 
GeneralRe: Office CommandBar Button Pin
Michael Dunn27-Apr-06 19:40
sitebuilderMichael Dunn27-Apr-06 19:40 
GeneralRe: Office CommandBar Button Pin
HakunaMatada27-Apr-06 20:24
HakunaMatada27-Apr-06 20:24 
GeneralRe: Office CommandBar Button Pin
Michael Dunn27-Apr-06 20:36
sitebuilderMichael Dunn27-Apr-06 20:36 
QuestionCscomp Rotor Pin
David_cole25-Apr-06 21:56
David_cole25-Apr-06 21:56 
QuestionClosing an Application Pin
lavate malllik25-Apr-06 18:44
lavate malllik25-Apr-06 18:44 
AnswerRe: Closing an Application Pin
Stephen Hewitt25-Apr-06 19:55
Stephen Hewitt25-Apr-06 19:55 
AnswerRe: Closing an Application Pin
Vibhash Jha3-May-06 2:59
Vibhash Jha3-May-06 2:59 
Questionusing matlab code in vb environment Pin
freesun25-Apr-06 9:07
freesun25-Apr-06 9:07 
AnswerRe: using matlab code in vb environment Pin
Vibhash Jha3-May-06 3:06
Vibhash Jha3-May-06 3:06 
GeneralRe: using matlab code in vb environment Pin
freesun3-May-06 3:22
freesun3-May-06 3:22 
GeneralRe: using matlab code in vb environment Pin
Vibhash Jha3-May-06 3:50
Vibhash Jha3-May-06 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.