|
-
Ops! I forgot one!
Hey, and what about the "VBMsoStdCompMgr" window? Does anyone have an idea
about it?
Lobo.
Soon: VBFX - http://www.fatorx.com.br
Dan Appleman <dan@desaware.com> wrote in message
news:38F41A16.AC2DB493@desaware.com...
>
>
> Lobo wrote:
>
> > Hi Dan,
> >
> > I have three questions for you:
> >
> > 1) Recently I had a real problem. I started building a class that would
> > receive a TextBox and a CommandButton controls. Then, I would set their
> > references to two private variables that used the 'WithEvents' keyword
to
> > handle their events. Well, these worked just fine, but, it just doesn't
fit
> > when the controls I'm trying to pass by are part of an array. It seems
that
> > VB implements/inherits an interface to the controls that are part of an
> > array to get the 'Index' parameter on the events, besides the other
features
> > of a collection. So, this error comes up: Error 459 - 'Object or class
does
> > not support the set of events'. I've tried to figure it out without any
> > success. Any idea??
> >
>
> Thou shalt not pass references to controls as parameters to classes. I've
heard
> of all sorts of problems when
> people do this.
> I know that's not the answer you want to hear, but I really would suggest
you
> reevaluate your design.
>
> >
> > 2) How much do you know about those hidden windows that VB creates
(their
> > classes names: "OleDdeWndClass 0x########", "OleMainThreadWndClass
> > 0x########", "VBMsoStdCompMgr", "VBBubbleRT6", "ThunderRT6Main",
> > "VBFocusRT6")? 'Cause I know just a little... Do you know where we can
find
> > some information about them? (it seems that MSDN doesn't have too much
thing
> > about it)
> >
>
> None of these are documented, but I know a little bit about a couple of
them.
> ThunderRT6Main is the main hidden window for your VB application (every VB
> application has one - it's the main
> top level application window - see my Win32 API book for a bit more about
this
> window).
> OleMainThreadWndClass is one of the windows that is used to marshal COM
method
> calls. Marshaling on a local system is handled internally by a sent or
posted
> message.
> I suspect OleDdeWndClass is the window used for DDE messages (DDE is also
a
> SendMessage/PostMessage based protocol under the hood).
> I have no idea what the other two are. VBBubbleRT6 seems especially
interesting.
> Anyone have an idea?
>
> >
> > 3) I was trying to figure out how the strings are handled in VB. The
> > variable-length string was just straightforward: using 'VarPtr' function
you
> > get the pointer to where the real data is stored (just the same pointer
you
> > would get using 'StrPtr' function), and, the string is allocated in a
new
> > place every time you make a change to it. So, I thought that the
> > fixed-length string would be just the same, with the difference that the
> > pointer where the real data stands would never change. But, it was not
like
> > that. With the 'StrPtr' I always can get the data but its pointer is
always
> > changing and couldn't figure out how to get this one only by using the
> > 'VarPtr' function... Can you give me the light?? (Note, this is just a
> > matter of understanding some VB's internals)
> >
>
> Almost everything you ask here is covered in incredible detail in my
previous
> book "Dan Appleman's Win32 API Puzzle Book and Tutorial for VB
Programmers". In
> that book you'll learn all about VarPtr, StrPtr and the magic of BSTR's
(the OLE
> subsystem strings which VB uses). Conversions from Unicode and ANSI, etc.
> As for StrPtr on fixed strings - I'm pretty sure it converts your fixed
string
> into a temporary dynamic string before returning the pointer - that's why
it's
> in a different memory location each time.
>
> Dan
>
>
-
Re: Ops! I forgot one!
>Hey, and what about the "VBMsoStdCompMgr" window? Does anyone have an idea about it?
Lobo,
I think it's a window related to COM marshaling too, used by VB on
Windows NT. Matthew Curland uses it in his threading code in the June
99 VBPJ.
Mattias
__________________________________________________
Mattias Sjögren (MCP) - mattiass @ hem.passagen.se
VB+ http://hem.spray.se/mattias.sjogren/
Please send questions/replies to the newsgroups
Similar Threads
-
By W.E. (Bill) Goodrich, PhD in forum .NET
Replies: 62
Last Post: 01-15-2002, 08:52 AM
-
By Ted Young in forum Database
Replies: 5
Last Post: 08-28-2001, 08:47 AM
-
By Kevin MacCallum in forum VB Classic
Replies: 2
Last Post: 11-10-2000, 06:34 PM
-
By Sean Kelly in forum VB Classic
Replies: 0
Last Post: 08-19-2000, 10:37 AM
-
By Richard Clark in forum vb.announcements
Replies: 0
Last Post: 04-11-2000, 08:35 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks