Click here to Skip to main content
15,895,667 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to call c++ DLL in vb 6 Pin
zhiyuan1614-May-09 4:39
zhiyuan1614-May-09 4:39 
GeneralRe: how to call c++ DLL in vb 6 Pin
Dave Kreskowiak14-May-09 7:06
mveDave Kreskowiak14-May-09 7:06 
GeneralRe: how to call c++ DLL in vb 6 Pin
zhiyuan1614-May-09 16:04
zhiyuan1614-May-09 16:04 
GeneralRe: how to call c++ DLL in vb 6 Pin
Dave Kreskowiak14-May-09 17:50
mveDave Kreskowiak14-May-09 17:50 
GeneralRe: how to call c++ DLL in vb 6 Pin
zhiyuan1614-May-09 18:06
zhiyuan1614-May-09 18:06 
GeneralRe: how to call c++ DLL in vb 6 Pin
Dave Kreskowiak15-May-09 2:22
mveDave Kreskowiak15-May-09 2:22 
AnswerRe: how to call c++ DLL in vb 6 Pin
Christian Graus14-May-09 3:06
protectorChristian Graus14-May-09 3:06 
QuestionAssembly is being destroyed to quickly. Pin
Jon_Boy13-May-09 9:26
Jon_Boy13-May-09 9:26 
I have an interop assembly being used in VB6 called ConvertOptions that is being used in various .dlls. I have an odd problem occurring. Below is an example of what is occurring.

Sub GetDescriptions
    Dim oOpt As New ConvertOptions.ConvertOptions

    'Misc VB6 code here...
    GetLabelData

    'oOpt internal variables are disposed here?

    'Misc VB6 code here.

    oOpt.dispose
    set oOpt = nothing
End Sub
    
Sub GetLabelData 
    Dim oOptions As New ConvertOptions.ConvertOptions

    'Misc code.
    oOptions.dispose
    set oOptions = nothing
End Sub


Method GetDescriptions has a local variable called oOpt (of ConvertOptions.ConvertOptions) which then calls GetLabelData. GetLabelData has it's own local ConvertOptions.ConvertOptions variable. At the end of the GetLabelData sub I dispose of the oOptions object.

When execution is returned to the GetDescriptions, the oOpt variable has it's internal objects = nothing.

Each sub has it's own local variable. There is not a module or global variable w/ the same name. The local vars are not passed by reference. The .Net project is not set for single instance. The only place that the variables in question the .Net assembly are destroyed is in the .dispose method.

Am I doing something obviously wrong? If an interop object is diposed of in one method, should it dispose all other interop objects of the same type in other methods?

Any suggestions, ideas, or 'constructive criticism' are always welcome.

"There's no such thing as a stupid question, only stupid people." - Mr. Garrison

AnswerRe: Assembly is being destroyed to quickly. Pin
Dave Kreskowiak13-May-09 9:59
mveDave Kreskowiak13-May-09 9:59 
GeneralRe: Assembly is being destroyed to quickly. Pin
Jon_Boy14-May-09 2:23
Jon_Boy14-May-09 2:23 
GeneralRe: Assembly is being destroyed to quickly. Pin
Jon_Boy14-May-09 3:19
Jon_Boy14-May-09 3:19 
QuestionMdi form and ToolStripContainer Pin
Samir Ibrahim13-May-09 4:27
Samir Ibrahim13-May-09 4:27 
AnswerRe: Mdi form and ToolStripContainer Pin
Dave Kreskowiak13-May-09 5:29
mveDave Kreskowiak13-May-09 5:29 
GeneralRe: Mdi form and ToolStripContainer Pin
Samir Ibrahim13-May-09 19:49
Samir Ibrahim13-May-09 19:49 
GeneralRe: Mdi form and ToolStripContainer Pin
Dave Kreskowiak14-May-09 2:02
mveDave Kreskowiak14-May-09 2:02 
GeneralRe: Mdi form and ToolStripContainer Pin
Samir Ibrahim14-May-09 2:28
Samir Ibrahim14-May-09 2:28 
Questionmultiple keypresses Pin
TheMrProgrammer13-May-09 4:06
TheMrProgrammer13-May-09 4:06 
AnswerRe: multiple keypresses Pin
Henry Minute13-May-09 4:58
Henry Minute13-May-09 4:58 
AnswerRe: multiple keypresses Pin
nlarson1113-May-09 8:02
nlarson1113-May-09 8:02 
QuestionRe: multiple keypresses Pin
JR21213-May-09 19:40
JR21213-May-09 19:40 
AnswerRe: multiple keypresses Pin
Dalek Dave13-May-09 21:38
professionalDalek Dave13-May-09 21:38 
GeneralRe: multiple keypresses Pin
Johan Hakkesteegt13-May-09 22:14
Johan Hakkesteegt13-May-09 22:14 
AnswerRe: multiple keypresses Pin
Dave Kreskowiak14-May-09 1:59
mveDave Kreskowiak14-May-09 1:59 
GeneralRe: multiple keypresses Pin
JR21214-May-09 3:03
JR21214-May-09 3:03 
QuestionGet file path Pin
rmedo13-May-09 2:32
rmedo13-May-09 2:32 

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.