DLL Newbie - Problems seeing functions?
Okay, okay. I admit I have little clue as to what I'm doing, so bear with me. Here's my (warped?) impression of what a DLL can do for me:
I've got a project that has a large number of functions and subs included. When I distribute the .exe, I'll be wanting to periodically update some of those functions and subroutines. Rather than force my users to re-install a new version of my software every few months, I had a dandy idea - let's stick all the functions into one DLL, and all the subs into another DLL!
Then, I'll add a simple button for users to click that will go and download the newest version of the DLL files. Tada! My program will always be up-to-date. (Have I convinced you I'm naive yet?)
So, here I am sticking all my functions and subs into DLLs when it suddenly occurs to me... I've no real idea what I'm doing. Specifically, I seem to have run into issues with my subs being able to interact with my .exe.
For example, I have a textbox on my form. I can create a DLL with a function that I call from my .exe project, and I can change the value in the textbox. Something like:
Code:
MyTextBox = MyActiveXFunction(MyArgument)
However, what if I have a subroutine that wants to directly manipulate my textbox? In my DLL, I'd like to be able to do something akin to:
Code:
MyForm.MyTextBox.Text = WhateverMyDLLSaysItIs
However, my DLL can't seem to see my .exe project.
Summary (since I seem to be long-winded):
#1) Am I approaching DLLs correctly? I can put anything I'd like to in there. And I assume there won't be any extra overhead or speed issues if I separate some of my functions and subs from the .exe program.
#2) Can I actually update my program periodically in this fashion? If I check the 'binary compatability' box in the DLL project, I believe I can update my program with the newer DLLs.
#3) How do I get my DLLs to alter my .exe components? It works the other way around (ie, my .exe project can use a sub or function in the DLL project)... so I assume I'm doing something simplistically wrong.
Any help would be greatly appreciated. :)