Click here to Skip to main content
16,007,277 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to convet XSD schema to database table Pin
Dave Kreskowiak13-Jun-07 3:24
mveDave Kreskowiak13-Jun-07 3:24 
QuestionConnect to DB on website Pin
Socheat.Net12-Jun-07 16:05
Socheat.Net12-Jun-07 16:05 
AnswerRe: Connect to DB on website Pin
Christian Graus12-Jun-07 16:20
protectorChristian Graus12-Jun-07 16:20 
GeneralRe: Connect to DB on website Pin
Socheat.Net12-Jun-07 16:29
Socheat.Net12-Jun-07 16:29 
GeneralRe: Connect to DB on website Pin
Christian Graus12-Jun-07 18:44
protectorChristian Graus12-Jun-07 18:44 
GeneralRe: Connect to DB on website Pin
Socheat.Net12-Jun-07 20:44
Socheat.Net12-Jun-07 20:44 
QuestionShare Point Pin
alexfromto12-Jun-07 14:05
alexfromto12-Jun-07 14:05 
QuestionHelp understanding Dim args = New Object() {myObject} Pin
twista12-Jun-07 12:15
twista12-Jun-07 12:15 
Hi,

I'm using the invoke method on some reflection, and don't really understand what I'm passing into the function.

My function passes an object reference which needs to be passed down into the reflected assembly.
The assembly then creates an object and then passes a reference back to this newly created object through the passed in object "ConfigObj"

<br />
  Public Sub ShowConfig(ByRef ConfigObj As Object)<br />
<br />
    ' ShowConfig() function inside my plugin takes in 1 argument, <br />
    ' the reference to an (config) 'object'<br />
<br />
    ' Create args array for the invoke() function, <br />
    ' containing our reference<br />
    Dim args = New Object() {ConfigObj}<br />
<br />
    ' display the Config window <br />
    ' wait for it to close <br />
    pShowConfig.Invoke(tsInterfaceObj, args)<br />
<br />
    ' all done. ConfigObj now points to something interesting<br />
 <br />
    ' actually we're not, args(0) contains the object <br />
    ' we want, not ConfigObj. Therefore make sure<br />
    ' ConfigObj is the correct reference is given back<br />
    ConfigObj = args(0)<br />
<br />
    ' Mmm, this now works!<br />
<br />
 End Sub<br />


I *thought* that if I set args to contain my passed in ConfigObj object, when passing that down into the pShowConfig methodinfo, it would return insided the ConfigObj object passed down (inside the args() array)

BUT

I'm finding that after the .Invoke() method, ConfigObj still references Nothing, but args(0) references the object which is being passed back. Therefore I'm needing to copy the args(0) reference into my ConfigObj variable.

It looks like when I perform the args = {} line, it just create a completely new object, with objects in the array OF TYPES of ConfigObj (Object Type), and not a reference to my ConfigObj Object passed in.

Is this correct?

It doesn't "feel" right....?

any points on this?

This is fundamental stuff, which I'm not getting Frown | :(

Thanks for your help,
Phil.
AnswerRe: Help understanding Dim args = New Object() {myObject} Pin
Guffa12-Jun-07 21:21
Guffa12-Jun-07 21:21 
GeneralHelp with a progress bar Pin
Psycho-*Coder*-Extreme12-Jun-07 10:54
Psycho-*Coder*-Extreme12-Jun-07 10:54 
GeneralRe: Help with a progress bar Pin
nlarson1112-Jun-07 10:59
nlarson1112-Jun-07 10:59 
GeneralRe: Help with a progress bar Pin
Christian Graus12-Jun-07 11:13
protectorChristian Graus12-Jun-07 11:13 
GeneralRe: Help with a progress bar Pin
Xandip12-Jun-07 18:45
Xandip12-Jun-07 18:45 
GeneralRe: Help with a progress bar Pin
Psycho-*Coder*-Extreme22-Jun-07 1:58
Psycho-*Coder*-Extreme22-Jun-07 1:58 
GeneralRe: Help with a progress bar Pin
GoodID21-Jun-07 20:00
GoodID21-Jun-07 20:00 
QuestionUnbound DataGridView and Checkbox Pin
jadaar12-Jun-07 9:10
jadaar12-Jun-07 9:10 
QuestionUnable to dispose of shared object Pin
mad_cow12-Jun-07 8:14
mad_cow12-Jun-07 8:14 
AnswerRe: Unable to dispose of shared object Pin
Guffa12-Jun-07 8:31
Guffa12-Jun-07 8:31 
GeneralRe: Unable to dispose of shared object Pin
mad_cow12-Jun-07 8:58
mad_cow12-Jun-07 8:58 
GeneralRe: Unable to dispose of shared object Pin
MidwestLimey12-Jun-07 9:33
professionalMidwestLimey12-Jun-07 9:33 
GeneralRe: Unable to dispose of shared object Pin
mad_cow12-Jun-07 9:49
mad_cow12-Jun-07 9:49 
GeneralRe: Unable to dispose of shared object Pin
MidwestLimey12-Jun-07 9:54
professionalMidwestLimey12-Jun-07 9:54 
GeneralRe: Unable to dispose of shared object Pin
mad_cow12-Jun-07 10:14
mad_cow12-Jun-07 10:14 
GeneralRe: Unable to dispose of shared object Pin
MidwestLimey12-Jun-07 10:30
professionalMidwestLimey12-Jun-07 10:30 
GeneralRe: Unable to dispose of shared object Pin
mad_cow12-Jun-07 10:36
mad_cow12-Jun-07 10:36 

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.