473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to compile OCX

Hi,thanks for motivating me.(Last time I gave myhomework to somebodyelse,but that is not good approach to learn.)I tried everything n learnt lot.But I have on doubt,plz tell me how to compile OCX.(I am creating HTTP File Upload OCX in VB6.0).Thanking you.
Mar 14 '08 #1
9 3958
debasisdas
8,127 Expert 4TB
From the file menu find the option Make OCX.

It will compile the code and create the ocx file for you.
Mar 14 '08 #2
From the file menu find the option Make OCX.

It will compile the code and create the ocx file for you.




sorry,not getting.Plz tell me again in brief.I have'nt created an OCX before.
Mar 14 '08 #3
debasisdas
8,127 Expert 4TB
sorry,not getting.Plz tell me again in brief.I have'nt created an OCX before.
Have you written the code for the OCX ?
Mar 14 '08 #4
Have you written the code for the OCX ?
Yes.First I searched what is it,I used API's n user control.I m posting my eritten code.

Public Function UploadFileHTTP(ByVal localFileName As String, ByVal remoteFileName As String) As Integer
'On Error Resume Next
Dim nRet As Integer
Dim nFileHandle As Integer
Dim sData As String
Dim lWritten As Long
Dim hConnect As Long
Dim hsend As Long
Dim nLOF As Long
Dim remoteFileSize As Long
Const BUFFER_SIZE = 1000

downloadCanceled = False 'Set initially to False
remoteFileSize = GetHTTPFileSize(remoteFileName)
sData = String(BUFFER_SIZE, 0)
nFileHandle = FreeFile

hConnect = InternetConnect(hInternet, "", INTERNET_DEFAULT_HTTP_PORT, "", "", INTERNET_SERVICE_HTTP, 0, 0)
If hConnect = 0 Then
GetHTTPErrorInfo
RaiseEvent DownloadErrorHTTP(HDC_ERROR_REMOTE_OPENFILE_FAILED , HDC_REMOTE_OPENFILE_FAILED, httpErrorCode, httpErrorString)
UploadFileHTTP = False
Exit Function
End If
hRequest = HttpOpenRequest(hConnect, "", "", Null, Null, Null, INTERNET_FLAG_RELOAD, 0)

Open localFileName For Binary Access Write As nFileHandle
nLOF = LOF(nFileHandle) + 1
nRet = InternetWriteFile(hConnect, sData, BUFFER_SIZE, lWritten)

Close nFileHandle
InternetCloseHandle hConnect
End Function
Mar 14 '08 #5
Have you written the code for the OCX ?
my question is how to test written code.I mean it is correct or not.
Mar 14 '08 #6
debasisdas
8,127 Expert 4TB
Compile the code (refer post #2).
Include the OCX in another standard EXE project and check if it works.
Mar 14 '08 #7
Swan
27
Compile the code (refer post #2).
Include the OCX in another standard EXE project and check if it works.
hey I got d point.I choose standerd EXE instead ActiveEXE.Now ok.I got d option make ocx.But I am getting error as "Error accessing System registry".
Mar 14 '08 #8
debasisdas
8,127 Expert 4TB
hey I got d point.I choose standerd EXE instead ActiveEXE.Now ok.I got d option make ocx.But I am getting error as "Error accessing System registry".

That is OK but

Why this duplicate ID ???
Mar 14 '08 #9
That is OK but

Why this duplicate ID ???
hey,don't take it othewise.It's not like that.Me n my friend commonly trying to solve the problem.That was by mistake.I am sorry.
Mar 14 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: janeaustine50 | last post by:
Python's InteractiveInterpreter uses the built-in compile function. According to the ref. manual, it doesn't seem to concern about the encoding of the source string. When I hand in an unicode...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
15
by: steve yee | last post by:
i want to detect if the compile is 32 bits or 64 bits in the source code itself. so different code are compiled respectively. how to do this?
16
by: desktop | last post by:
I have read that using templates makes types know at compile time and using inheritance the types are first decided at runtime. The use of pointers and casts also indicates that the types will...
1
by: brianrpsgt1 | last post by:
Newbie here.... I have been able to successful pull info from a MySQL DB, get the results and output them in an HTML format using Cheetah to the screen using IDLE. I am doing this on a Windows...
3
by: NvrBst | last post by:
Right now I have C99 code in .c extensions. I compile it in VSC++ and it complains about a lot of errors. I change the extensions to .cpp and compile in VSC++ and it succeeds. Is there a way...
6
by: Ed Leafe | last post by:
I've noticed an odd behavior with compile() and code that does not contain a trailing newline: if the last line is a comment inside of any block, a syntax error is thrown, but if the last line is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.