|
Can anyone help me please?
How to call an ocx control(designed in vb) in
a vc++ programme?
|
|
|
|
|
Make sure that your OCX is registered.
In the VC++ IDE, with your project loaded, goto Project->Add to Project->Components and Controls. Select Registered ActiveX Controls. Find your control and click Insert. The IDE will make a class to wrap your control. Use this class to create an instance and then call into the methods.
|
|
|
|
|
I am currently working on a project dealing with Client and Server program using API Socket. There are no problems for sending and receiving messages although I always get unknown error when the program ends.....
Is there any possibility for built-in class in Visual Studio to be a problem?? cuz i am using fflush.c which is included in Microsoft Visual Studio\VC98\CRT\SRC\fflush.c !!!!!
Below is my code and please see closely 14 th line.
/***
*fflush.c - flush a stream buffer
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines fflush() - flush the buffer on a stream
* _flushall() - flush all stream buffers
*
*******************************************************************************/
1 static int __cdecl flsall (
2 int flushflag
3 )
4 {
5 REG1 int i;
6 int count = 0;
7 int errcode = 0;8
9
10 _mlock(_IOB_SCAN_LOCK);
11
12 for ( i = 0 ; i < _nstream ; i++ ) {
13
14 if ( (__piob != NULL) && (inuse((FILE *)__piob)) ) {
15
16 #if def _MT
/*
* lock the stream. this is not done until testing
* the stream is in use to avoid unnecessarily creating
* a lock for every stream. the price is having to
* retest the stream after the lock has been asserted.
*/
_lock_str2(i, __piob);
-------------------------------------------------------------------------------------------
line 14 error
First-chance exception in Step2Client.exe: 0xC0000005: Access Violation.
__piob 0x00000000
_nstream 512
i 0
|
|
|
|
|
i am a beginner in programming,and i am learning c++;
today i find the following lines ,i dont know the syntax like this :
static _Interface* GetInterfacePtr() throw()
{
return NULL;
}
anybody waste some time to help me?
thanks in advance
|
|
|
|
|
|
i dont understand the " throw() ",does it break the definition of the function GetInterfacePtr()?
thanks
|
|
|
|
|
|
then if it is "throw (type)" ,what is the meaning ?
would you please tell me where i can find the explanation of the syntax ?
thanks
|
|
|
|
|
It would mean that the function may throw only exceptions of class "type". Look up "exception specification" in some proper C++ reference. Exception specifications aren't supported by VC++6.
|
|
|
|
|
markkuk wrote:
Exception specifications aren't supported by VC++6.
You sure about that? The first hit in MSDN when searching for "exception specification" shows examples of VC code using exception specifications.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Michael may be this gauy is confused for the following:
Microsoft Specific —>
Microsoft C++ does not support the function exception specification mechanism, as described in section 15.4 of the ANSI C++ draft.
I found that in the MSDN under Exception Handling Syntax It's a little confuss butc don't said that VC doesn't support Exception specifications...
Reagards...
Today is Friday!!! and Party!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
If you declare something like:
void SampleFunction(void) throw (int)
{
}
and compile, you will get
warning C4290: C++ Exception Specification ignored
I vote pro drink
|
|
|
|
|
I am not sure a raw beginner should be directly jumping into COM. Anyway good luck!
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I have huge files (<100Mb ) and want to map a number of the to mem. First up How do I determine where to start to map in memory? I am using NT so how do I know how much it is using.
And if you can help , how would you go about mapping large files in the first place?
Thanks
|
|
|
|
|
The functions will tell you exactly where the mapping starts.
Use CreateFileMapping() to create a mapping to file and MapViewOfFile() to load a portion (or all file) into memory. The last function will return you LPBYTE , points to the start of mapping
Look for descriptions of the functions in MSDN.
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Anyone know of a good class to enumerate all of the files in a directory with a given extension?
Ex: all files in c:\temp with extension .xyz
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
CFileFind.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks, too! You just beat my post.
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
CPians are really fast at answering questions
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Looks like I should've looked around a bit longer:
CFileFind
Marcus Spitzmiller
"Ha ha, Stupid bloropope.." - Homer
|
|
|
|
|
Hi all,
I would like to know if VC++ 7.0, that's what I heard is the next version, if it is a seperate commercial release or if it is part of MS .NET studio?
Thanks,
Don Cathcart
|
|
|
|
|
VC++ 7.0 is part of Visual Studio .NET
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thanks, that was fast?
Is there a Standard, Pro and Enterprise versions of Visual Studio .NET?
|
|
|
|
|
I guess there would be at least two editions, perhaps even more.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
MasterBlaster?
Here that's what we call Sachin Tendulkar .
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|