|
Hi all,
I create an OCX using VB6. The functions in this OCX are:
Public Function TestByte(MyByte as Byte) As Byte
Public Function TestInt(MyInt as Integer) As Integer
Then I try to use this OCX in a MFC project and realize that MFC cannot recognize VB's "Byte". Thus the function TestByte cannot be imported to the MFC application.
My question... WHY??? isnt byte a very basic data type?
I can go round this problem for now... but this is a really intriguing. Feel free to tell me why... ) Thanks.
|
|
|
|
|
AFAIK, Byte in VB is BYTE in MFC/Win32 (or just use unsigned char). It's just a naming inconsistency between those platforms, and you should still be able to call the OCX - the interface generated for C++ would use BYTE TextByte(BYTE MyByte) as the definition (or something similar)
Of course, all my experience with this is going the other way round - C++ control, VB application.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
Hi Ian,
Actually I did a reverse after posting this message (writing an OCX using VC to use in VB). It appears that, OLE dont support BYTE as a parameter for OCXs... i do not understand why.
I understand what you mean, Byte in VB is 1 byte, BYTE in VC is 1 byte, they are the same. I wrote DLLs for VB using VC before, and they work together... just that for OCX...
Am I correct? or is there really a away to do it? Anyway, thanks for your help. )
Keh
|
|
|
|
|
|
What is the best way to detect which applications are installed on a machine and where the executable for the installed application resides. Since I'm working with older machines many of the applications were not installed with the windows installer specs.
|
|
|
|
|
The registry stores the uninstallation information in the key 'HKEY_LOCAL_MACHINE\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall', I presume you could trawl through the list of sub-keys to get a list of applications that are registered as installed on the system. Other than that I'm not aware of a way of detecting whether a program has been 'installed' or not, without the registry mechanism.
Hope this helps.
Alan.
P.S. note that you'll only get the path to the UNINSTALL.EXE, but I'm sure you can strip the path down to find its root folder for searching. Not all programs keep the uninstall.exe in the actual installation folder, but if you extract the program name and perhaps search for it in the registry you may find it...who knows, it certainly isn't simple
|
|
|
|
|
Can i get all error with one function? (not error handler and goto and ... in each event)?
can any one answer to me????
MkhProgrammer
|
|
|
|
|
How to connect to remote SQL Server database using the socket connection, sample code from the beginging is required.
|
|
|
|
|
|
Good afternoon!
How can we integrate a password generator(freeware) into a windows form application? This password generator will be used in an election system. We really need your help.
Thank you.....
|
|
|
|
|
I want to change the path of my database connection in the adapters with only one procedure. Can anyone tell me how and if one can do that? I want to change between databases, that is why i want to change the path of the connection in the adapters.
Thanks!
|
|
|
|
|
This is silly, but i want to know where the best place is to make a script file for the creation of a new database. Must i write the script file in VB.net or in Access? And how do i use it (implement the script file so that a new database is created)?
Please help, I am in the dark!
|
|
|
|
|
for which database? MSAccess? and if yes, then why dont u copy the database it self??
Bit confused with yr question...
NetPointer
|
|
|
|
|
Yes MSAccess, and I want to use it for adding an extra company's database to my program.
OK, I can copy the existing db, but i don't know exactly how many companies will be added!
I am doing it in VBScript now, but still don't know how to use it!
|
|
|
|
|
:-OI would like to know, if I could use FileCopy to backup my Access Database?
Blonde
|
|
|
|
|
System.IO.File.Copy (Source, Destination, Overwrite)
Check that connection is closed.
|
|
|
|
|
Thank you so much ! I truly appreciate it.
Will make sure I close connection before copy.
|
|
|
|
|
I have been searching for days, but I just can't seem to make heads or tails of anything google brings up. Here's my situation, I need a quick and dirty program that can read the contents (string) of a specific memory address of a separately running process.
I have it to the point where I can find the window I need via hwnd/findwindow, I can associate the processID, but everytime I dive into readprocessmemory I just can't make it work. Any help is greatly appreciated. Thanks!
PS - VB6, not VB.net
-Brian Nelson (Arokh)
|
|
|
|
|
|
I am currently working with the internet transfer control in VB6, but I have a problem. The file I need to get is passworded, but it's not an FTP site, and I know the control has ways of doing usernames and passwords on FTP's, but this is just a regular page with an account name and password.
Right here's where I need to get it from: https://www.e-gold.com/acct/historycsv.asp
But as you can see, username and password are needed. I haven't the slightest clue as to how to get the username and password in there and push it through to get the file I need. I know it's possible on this site, it's been done before by a programmer with about the same skill as me. But, he doesn't want to share code
Any help?
|
|
|
|
|
OKay, I randomly just figured that out on my own. New problem::: The values in the file are comma seperated. How to I parse it? (there are some strings of commas that have no values or spaces in-between too, FYI)
|
|
|
|
|
|
anyone know how to draw any shapes(square, trapezium) and the drew shape can drag using mouse to move around the form in VB .NET??
sounds something like using visio, but i just need the small graphic control part...plz...urgent help...
|
|
|
|
|
Draw the shape on a label or panel.
You can drag the whole control then...
|
|
|
|
|
Hi,
I am using Word Object library in my program to open word documents and save it as RTF documents. It seems this is not saving the Header/Footer information in the RTF file.
Any Suggestions?
Thanks.
GTS
|
|
|
|