NewSocket.cls/mWinsock.bas has received several small updates.
1. All references to StrConv/vbUnicode have been removed and replaced by StrToByte/ByteToStr. This was necessitated to support some upper ANSI characters above &H7F, commonly encountered when using cryptography.
2. The code to load the assembler hex code in "Subclass_Initialize" has been simplified by introducing a routine called "HexToByte", and this routine has been made Public to allow for general use.
3. The memory allocated for the assembler code has been changed from "GlobalAlloc" to "VirtualAlloc". Most Desktop computers enable DEP (Data Exection Prevention) for essential programs and services only, but most servers and a few desktop computers will enable it for all programs. Because we are running assembler code in the data area, an abrupt and unexplained failure is experienced when running the executable using GlobalAlloc with DEP enabled for all programs. The same failure will not occur in the IDE because the IDE runs in Virtual Memory.
4. The functions "InitiateService/FinalizeService" has been eliminated and the code from them included in "InitiateProcesses/FinalizeProcesses".
5. The name for the Log File was inadvertently left at the first program that it was tested with (IPv6Chat.Log), and has been changed to "Socket.Log". This log file can be used to log debug statements while running the executable, by enabling "DbgFlg".
The ActiveX control (NewSocket.ocx) does require registration. If you previously used this control, it was automtically registered the first time you used it. To replace it, deregister the old one first using "regsvr32.exe", and delete the files "NewSocket.ocx/NewSocket.oca" from the \Windows\System32\ directory (\Windows\Syswow64\ on 64 bit systems). After compiling the control, copy the new "ocx" file to the same directory. The "oca" file will be automatically generated. Full instructions can be found in the "Readme.txt" file.
I have included 2 small test programs, as well as a simple ocxTest program to aid with the registration process. PrjTest downloads a small HTML file from our server using NewSocket.cls/mWinSock.bas. WebTest2 does the same thing using using the NewSocket Control.
J.A. Coutts
1. All references to StrConv/vbUnicode have been removed and replaced by StrToByte/ByteToStr. This was necessitated to support some upper ANSI characters above &H7F, commonly encountered when using cryptography.
2. The code to load the assembler hex code in "Subclass_Initialize" has been simplified by introducing a routine called "HexToByte", and this routine has been made Public to allow for general use.
3. The memory allocated for the assembler code has been changed from "GlobalAlloc" to "VirtualAlloc". Most Desktop computers enable DEP (Data Exection Prevention) for essential programs and services only, but most servers and a few desktop computers will enable it for all programs. Because we are running assembler code in the data area, an abrupt and unexplained failure is experienced when running the executable using GlobalAlloc with DEP enabled for all programs. The same failure will not occur in the IDE because the IDE runs in Virtual Memory.
4. The functions "InitiateService/FinalizeService" has been eliminated and the code from them included in "InitiateProcesses/FinalizeProcesses".
5. The name for the Log File was inadvertently left at the first program that it was tested with (IPv6Chat.Log), and has been changed to "Socket.Log". This log file can be used to log debug statements while running the executable, by enabling "DbgFlg".
The ActiveX control (NewSocket.ocx) does require registration. If you previously used this control, it was automtically registered the first time you used it. To replace it, deregister the old one first using "regsvr32.exe", and delete the files "NewSocket.ocx/NewSocket.oca" from the \Windows\System32\ directory (\Windows\Syswow64\ on 64 bit systems). After compiling the control, copy the new "ocx" file to the same directory. The "oca" file will be automatically generated. Full instructions can be found in the "Readme.txt" file.
I have included 2 small test programs, as well as a simple ocxTest program to aid with the registration process. PrjTest downloads a small HTML file from our server using NewSocket.cls/mWinSock.bas. WebTest2 does the same thing using using the NewSocket Control.
J.A. Coutts