BC_Programmer,
BC_Programmer does not work for the Computer Hope Board. BC_Programmer is not in charge of anything. I suspect BC_Programmer
flunked out college because BC_Programmer spent all of his study time playing video games. Now BC_Programmer is back home doing nothing.
By the way, BC_Programmer pretends he is so well informed about Programming but none of his posts show any code. All BC_Programmer
does is play off other people's code
BC_Programmer is a phony.
very well then...
interesting... exceeded the maximum post length...
I attached it instead.
You would think I would be concerned about theft of my code, but the class is useless without the rest my other classes, modules, and even resources, I believe.
Shall I also post my XML parsing code to generate VBAccelerator Commandbar heirarchies? Or perhaps my COM code for showing the right-click explorer menu? Or perhaps some other even more down-level COM code using weak references and Copymemory into VB object references, delicately handled with carefully crafted coe to prevent VB from accessing a object reference it believes to contain a valid object but in fact has been filled with zeros because of using copymemory directly into the pointer retrieved by the undocumented ObjPtr() function.
Or perhaps my new version of my code for enumerating alternate data streams using NTQueryInformationFile()?
Actually, that's short enough to post here:
Public Function ListStreams(sPath As String) As CAlternateStreams
Dim IOS As IO_STATUS_BLOCK
Dim BBuf() As Byte
Dim FSInfo As FILE_STREAM_INFORMATION
Dim LBuf As Long, LInfo As Long, LRet As Long
Dim LErr As Long
Dim sName As String, SNames As String
Dim newstreams As CAlternateStreams
Set newstreams = New CAlternateStreams
newstreams.Owner = sPath
On Error Resume Next
'ListStreams = ""
LRet = CreateFile(sPath, DesiredAccessFlags.STANDARD_RIGHTS_READ, FILE_SHARE_READ, 0&, OPEN_EXISTING, _
FILE_FLAG_BACKUP_SEMANTICS, 0&)
If (LRet = -1) Then Exit Function
LBuf = 4096
LErr = 234
ReDim BBuf(1 To LBuf)
Do While LErr = 234
LErr = NtQueryInformationFile(LRet, IOS, ByVal VarPtr(BBuf(1)), LBuf, _
ByVal FileStreamInformation)
If (LErr = 234) Then
LBuf = LBuf + 4096
ReDim BBuf(1 To LBuf)
End If
Loop
LInfo = VarPtr(BBuf(1))
Dim newstream As CAlternateStream
Do
CopyMemory ByVal VarPtr(FSInfo.NextEntryOffset), ByVal LInfo, Len(FSInfo)
'CopyMemory ByVal VarPtr(FSInfo.StreamName(0)), ByVal LInfo + 24, _
'
'FSInfo.StreamNameLength
sName = Left$(FSInfo.StreamName, FSInfo.StreamNameLength / 2)
If (InStr(1, sName, DATA_1, 1) = 0) And (InStr(1, sName, DATA_2, 1) = 0) _
And (sName <> "") Then
'SNames = SNames & Mid$(sName, 2, Len(sName) - 7) & " * " & _
CStr(FSInfo.StreamSize) & "|"
Set newstream = New CAlternateStream
newstream.Init sPath, Mid$(sName, 2, Len(sName) - 7), _
FSInfo.StreamSize, FSInfo.StreamSizeHi
newstreams.Add newstream
End If
If FSInfo.NextEntryOffset Then
LInfo = LInfo + FSInfo.NextEntryOffset
Else
Exit Do
End If
Loop
CloseHandle LRet
If (Len(SNames) > 0) Then SNames = Left$(SNames, (Len(SNames) - 1))
Set ListStreams = newstreams
'Stop
End Function
In order to be functional it would need some changes to exclude the usage of my CAlternateStream(s) classes; perhaps instead returning an array of User-defined types.
BC_Programmer,
BC_Programmer does not work for the Computer Hope Board. BC_Programmer is not in charge of anything. I suspect BC_Programmer
flunked out college because BC_Programmer spent all of his study time playing video games. Now BC_Programmer is back home doing nothing.
Actually, I never went to college. From what I can tell it merely gives graduates a completely unjustified "holier then thou" attitude; of which I imagine you to be a prime example.
Regardless, no academic institution that I know of teaches
proper programming principles, instead they opt to teach the poor souls Object oriented programming, resulting in "object happy" programs from programmer's straight out of college, where a simple hello-world application becomes a derived class implementing ten different interfaces from "IHelloWorldPrintableText" to "IPrintableTextIsString" and using variable naming conventions that follow hungarian notation so closely as to make anybody sick. The problem with such code is not that it doesn't work, or the fact that it is slower then a dead dinosaur, but rather that nobody can
see the code through the objects.
Take as an example, Bruce McKinney; while his Hardcore Visual Basic book has a few loose ends and various questionable assumptions, it is essentially a bible that VB Classic Programmers, which includes quite a rank, such as
Karl E. Peterson, and
Steve Mcmahon... both of which have quite obviously gone quite past Bruce's original definition of a "hardcore VB programmer". The point? Well- looking at Bruce McKinney's Credentials, we find that his post-secondary Education in Computer Science is Nil. Non-existent. (well, in all fairness he describes it as "the school of hard knocks").
The conclusion one can draw upon this, and various other examples, not to mention people who it can almost be presupposed don't have a brain that you later discover have a master's degree (and no, I am not talking about you billrich; I know several... folks that are working in areas that while proper for their "education" does not fit their "intelligence".).
Only practical Experience and hands-on knowledge provide a positive benefit. For a large sum a university or college can show you how to teach yourself, but you can do the same for free at home, with the proper literature, such as "Code Complete".
learning in college what a Binary Tree is is useless. I was never formally taught what a binary tree was at any point in my education- I taught myself- mostly from a java data structures book, actually, but I digress. Even without such education I can still code up a quick, if not completely generic and therefore useless in most contexts, tree class that supports all the proper traversals of the tree being returned in an array, including Pre-Order, In-Order and Post-Order traversals.
And of course Red-Black trees and Binary Sorted trees, AVL trees and the like, none of which I want to get into here anyway.
The thing is-
none of it matters.
You can learn about the specifics of AVL trees all you want, but unless you're smart enough, you'll never make the connection later on in the field when a problem is presented, "Golly, I could Use Red-Black trees here". And in fact- with the proper "smarts" /analytic thinking even the most "unlearned" folk can still make the connection as to appropriate tool, even if they don't know the proper term for that tool.
[attachment deleted by admin]