荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: tang (独孤九剑〖玄铁重剑〗), 信区: Program
标  题: [转载]  MSVC Digest - 5 Jan 1999 to 6 Jan 1999 (#1999-6)
发信站: BBS 荔园晨风站 (Thu Jan  7 14:10:59 1999), 站内信件

【 以下文字转载自 tang 的信箱 】
【 原文由 Automatic 所发表 】
There are 16 messages totalling 682 lines in this issue.

Topics of the day:

  1. precompiled headers
  2. Low Overhead DBF access
  3. Multiple CSplitterWnd's?
  4. Automation doubt (OLE) - urgent.
  5. unresolved external symbol _main
  6. Query on 16 bit applications (3)
  7. I've seen *& (pointer to a reference?) Why use it? (4)
  8. Structured Storage Maximum Size
  9. Detecting a call to the internet.
 10. How To Connect ODBC Data Source in NT SERVICES
 11. returning a char pointer from a DLL

--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

----------------------------------------------------------------------

Date:    Wed, 6 Jan 1999 11:08:32 +0530
From:    Aditya Kumar <aditya@NOIDA.HCLT.COM>
Subject: precompiled headers

Hi ,

ENV : win 95 , VC 5.0

In precompiled header options , I am using "automatic use of precompiled
header " now , because I moved the stdafx.h file to a different
directory .

I think , because of this , the project is taking  much longer to
compile .
Is this true ?
I was unable to get much info from the help files .

TIA

Aditya


--
********************************************************************
Aditya Kumar                    |    aditya@noida.hclt.com
HCL Technologies,               |
Sector 11 , Noida.              |    adi47@hotmail.com

## Still looking for something witty to add to my sign ! ##
********************************************************************

------------------------------

Date:    Wed, 6 Jan 1999 08:10:23 +0200
From:    "Mostovlyansky, Oleg" <Mostovlyansky@SCIENCESOFT.INVENTION-MACHINE.COM>
Subject: Re: Low Overhead DBF access

Try CodeBase/CodeBase++ - http://www.sequiter.com/

Regards,
OM

> -----Original Message-----
> From: Nathan T. Wild [SMTP:nwild@BIGFOOT.COM]
> Sent: 06 =FF=ED=E2=E0=F0=FF 1999 =E3. 03:23
> To:   MSVC@PEACH.EASE.LSOFT.COM
> Subject:      Low Overhead DBF access
>=20
> I want to write a DLL in C/C++ which needs to access some dBase III
> tables.
>=20
> My admittedly limited exposure to MFC has lead me to believe that for
> my
> simple requirements, the DAO, etc. is overkill in a big way.
>=20
> Is there a simple C API for Jet database access?  If not, how can I =
go
> about
> making a minimalist MFC DLL (yes...  size still counts!)...
>=20
> Thanks in advance for any help you can offer...
>=20
> =
----------------------------------------------------------------------
> ----
> The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> international's LISTSERV(R) software.  For subscription/signoff info
> and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Wed, 6 Jan 1999 08:21:57 +0000
From:    Max Walshe <Max_Walshe@BARACING.CO.UK>
Subject: Re: Multiple CSplitterWnd's?

To create a splitter as you have sketched it you need to split the main frame
first into two horizontal panes. Once you have done that you need to split
the top frame into two vertically yielding three views in all.

I can't remember off hand where to get the CCreateContext from but
I remember it's not particularly difficult. It may be that you create your
own and use that. Thinking about it that's probably what I did (it is
quite a while ago now) as most of the members of the class are
easy to fill in.

Hope this helps

Max

Max Walshe    (mwalshe@baracing.co.uk)
Senior Software Engineer
British American Racing    'A Tradition of Excellence'

------------------------------

Date:    Wed, 6 Jan 1999 13:50:14 +0530
From:    "Nirmala.R." <nirmala.r@BLR.SNI.DE>
Subject: Automation doubt (OLE) - urgent.

Hello,

I've a small doubt.
I'm creating an automation object which supports dual interface.
I have a container and calling this object by IDispatch method. (ie.
GetIDsofNames and then calling Invoke). I want to have a group of 3
parameters as one property...
Eg. EmpDetails property (shd. contain name, rollno, grade and salary).
How to do that?

If it is possible, then how can i send this structure as a VARIANT
datatype for get_EmpDetails and put_EmpDetails?? In get_EmpDetails,
again the ret parameter for Invoke can be just a VARIANT. So, is it not
possible to group some parameters as a property???

It is a bit urgent. Can u pls. get back to me soon?????

Waiting for the reply,
Best Regards,
Nirmala.

------------------------------

Date:    Wed, 6 Jan 1999 17:48:40 +0530
From:    Venkatesh MJ <MJ.Venkatesh@BLR.SPCNL.CO.IN>
Subject: Re: unresolved external symbol _main

Hello,
I copied the same code and created a new work space and built it. No
problems. Built and is running also. It gives a window and changes the
cursor within the window.

I have a p2, NT and vc5. I created a Win32 workspace.

Bye
MJV

------------------------------

Date:    Wed, 6 Jan 1999 19:03:10 +0530
From:    swapna.valaranikalam@DB.COM
Subject: Query on 16 bit applications

Hi,

Does anybody support 16bit MSVC applications?
I have a 16bit MSVC application which users will be using and I need to
support it .
The unfortunate part is that MSVC V5 is the first environment which is Y2K
compliant.
Is it possible to create 16bit applications in this environment ?
MSVC1.52 is the last 16bit environment but this is not Y2K compliant.
How do we support 16bit applications and certify our product as Y2K
compliant?

Thanks and regards,
Swapna

------------------------------

Date:    Wed, 6 Jan 1999 15:16:23 +0100
From:    Volker Glave <gla@ADTRANZSIG.DE>
Subject: Re: Query on 16 bit applications

swapna.valaranikalam@DB.COM wrote:
>
> The unfortunate part is that MSVC V5 is the first environment
> which is Y2K compliant. Is it possible to create 16bit
> applications in this environment?

No.

> MSVC1.52 is the last 16bit environment but this is not Y2K
> compliant.

For what reason do you think this is the case? Yes, Microsoft
does not certify MSVC1.52 as beeing Y2K compliant, but it may
well be that it is none the less. I believe it is.

> How do we support 16bit applications and certify our product
> as Y2K compliant?

Simple. Test your 16bit applications against the common known
Y2K problems. Maybe you have to correct something. When your
apps finaly pass the tests, you can say they are Y2K compliant.

Regards,
Volker

------------------------------

Date:    Wed, 6 Jan 1999 08:36:26 -0600
From:    Jeff_Nygren_AT_PO20@CCMTA-DCC_MAIL_HUB.MAIL.DATACARD.COM
Subject: Re: Query on 16 bit applications

Yes 'somebody' still supports 16-bit programs. You don't need to have Y2K
compliant tools to write Y2K compliant programs. The two things are
unrelated.
(Also, you can easily write applications with Y2K bugs, using the Y2K
compliant VC5.)

Think about this. Why would your compiler generate different code on
1/1/2000
than it would on 1/1/1999 or any other date? The function of compiling an
application is not date dependent. I doubt that MSVC1.52 actually has any
Y2K
problems. It's just that Micro$oft has chosen not to waste the time and
resources to certify it.

CAVEAT: If your code is using any 'date related' functions from the C
Runtime
Library, you need to check this code and ensure that if it is using 2 digit
years, it will do what you want when that year is '00'. Even this won't
necessarily cause a Y2K problem.

Ignore the media hype. Just use common sense to decide whether any
particular
thing (checkbook program, Flight Simulator, computer in your dishwasher,
etc.)
could have a Y2K problem!

Jeff Nygren


______________________________ Reply Separator ____________________________
_____
Subject: Query on 16 bit applications
Author:  "Microsoft Visual C++ programmers list"
<MSVC@PEACH.EASE.LSOFT.COM>
(swapna.valaranikalam@DB.COM) at DATACARD
Date:    1/6/99 1:33 PM






     Hi,

     Does anybody support 16bit MSVC applications?
     I have a 16bit MSVC application which users will be using and I need
     to
     support it .
     The unfortunate part is that MSVC V5 is the first environment which is
     Y2K compliant.
     Is it possible to create 16bit applications in this environment ?
     MSVC1.52 is the last 16bit environment but this is not Y2K compliant.
     How do we support 16bit applications and certify our product as Y2K
     compliant?

     Thanks and regards,
     Swapna

     ----------------------------------------------------------------------
     ----
     The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
     international's LISTSERV(R) software.  For subscription/signoff info
     and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Wed, 6 Jan 1999 09:45:16 -0600
From:    David Cotton <David.Cotton@MARCGROUP.COM>
Subject: I've seen *& (pointer to a reference?) Why use it?

I'm hoping that someone can give me a few hints as to why someone would use a
function parameter like this:

int func ( TmplClass<TypeClass> *&parm )

What are the advantages over sending a regular pointer?

This seems to override the benefit of a reference. i.e. References are
implemented internally as a pointer but externally interface as a copy. Thus
allowing access as a pointer, but prevents altering the pointer itself.

So the essential question seems to be why would I use this construct?

Thanks,
Dave

------------------------------

Date:    Wed, 6 Jan 1999 11:34:14 -0500
From:    "MARCOK, ZLATKO" <zlatko.marcok@BELL.CA>
Subject: Re: I've seen *& (pointer to a reference?) Why use it?

Hello David.

The syntax you are asking about
> int func ( TmplClass<TypeClass> *&parm )
is a reference to a pointer (not pointer to a reference).
You would use it if the caller of func needed the pointer to be altered.
Perhaps the caller needs the pointer to point to just past the memory
examined by func so that the caller can pick up where the func left off.

The syntax is equivalent to
int func2(TmplClass<TypeClass> **parm) but using the reference makes the
syntax within func easier to read compared to that of func2. References
are generally preferred to pointers because there cannot be a null
reference.

As an example, compare the two implementations.
int func ( TmplClass<TypeClass> *&parm )
{
        if (parm == NULL)
        {
                // handle the error.
        }
        TmplClass<TypeClass> x = *parm;
        ++parm;
}

int func2 ( TmplClass<TypeClass> **parm )
{
        if (parm == NULL || *parm == NULL)
        {
                // handle the error.
        }
        TmplClass<TypeClass> x = **parm;
        ++(*parm);
}

David Cotton wrote:
>
> I'm hoping that someone can give me a few hints as to why someone would use a
> function parameter like this:
>
> int func ( TmplClass<TypeClass> *&parm )
>
> What are the advantages over sending a regular pointer?
>
> This seems to override the benefit of a reference. i.e. References are
> implemented internally as a pointer but externally interface as a copy. Thus
> allowing access as a pointer, but prevents altering the pointer itself.
>
> So the essential question seems to be why would I use this construct?
>
> Thanks,
> Dave
>
> --------------------------------------------------------------------------
> The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> international's LISTSERV(R) software.  For subscription/signoff info
> and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Wed, 6 Jan 1999 11:36:17 -0500
From:    "Worden,Brent" <wordenb@OCLC.ORG>
Subject: Re: I've seen *& (pointer to a reference?) Why use it?

Actually, it's a reference to a pointer and not a pointer to a reference.

So, with a reference to a pointer parameter, one can change the address of
the pointer as well as the contents of the pointer.

With just an ordinary pointer parameter, one can only change the contents of
the pointer.

Brent Worden
Systems Analyst
OCLC, Inc.
614.764.6035
wordenb@oclc.org



-----Original Message-----
From: David Cotton [mailto:David.Cotton@MARCGROUP.COM]
Sent: Wednesday, January 06, 1999 10:45 AM
To: MSVC@PEACH.EASE.LSOFT.COM
Subject: I've seen *& (pointer to a reference?) Why use it?


I'm hoping that someone can give me a few hints as to why someone would use
a
function parameter like this:

int func ( TmplClass<TypeClass> *&parm )

What are the advantages over sending a regular pointer?

This seems to override the benefit of a reference. i.e. References are
implemented internally as a pointer but externally interface as a copy. Thus
allowing access as a pointer, but prevents altering the pointer itself.

So the essential question seems to be why would I use this construct?

Thanks,
Dave

--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Wed, 6 Jan 1999 17:43:42 +0100
From:    Dan Lofquist <danne@POLYMORPH.SE>
Subject: Re: Structured Storage Maximum Size

Hi Terry,

I tried your testprogram and must say that i was confused, it run well
untill 'i' iteration #2030 then every iteration took about 15 mins to
complete.
But it didnt hang, yet i have a Dual PII 450 with 256mb and two 9gb SCSI
disks
system and it was sooo slow. But hey, it worked !! :-)))

Regards Danne


> -----Original Message-----
> From: Microsoft Visual C++ programmers list
> [mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of Terry Griffin
> Sent: Tuesday, January 05, 1999 3:49 PM
> To: MSVC@PEACH.EASE.LSOFT.COM
> Subject: Structured Storage Maximum Size
>
>
> Hi All,
>    I have a problem writing a large amount of data to a stream in
> a Compound file. I wrote a small test program that shows that
> same behavior. After writing about 930 Meg to the file the call
> to Write hangs.   There is still about 1.5 GB of free disk space
> when the app hangs. The documentation indicates that the maximum
> size should be 4 GB. Does anyone know if the real maximum is only
> about 1 GB or is there some other problem. Any help is appreciated.
>
> Here is the code I used to test.
>
> #include <iostream.h>
> #include <windows.h>
>
> int main()
> {
>    IStorage *pStorage = 0;
>    int iData[1024] = {0};
>    IStream *pStream1 = 0;
>    IStream *pStream2 = 0;
>    HRESULT hr;
>    ULONG dc;
>    int i,j;
>
>    hr = ::StgCreateDocfile(L"F:\\Temp\\BigFile",
>         STGM_READWRITE|STGM_DIRECT|STGM_SHARE_EXCLUSIVE|STGM_CREATE,
>                                 0, &pStorage);
>    if (FAILED(hr)) {
>       cout << "StgCreateDocfile failed";
>       return -1;
>    }
>    hr =
> pStorage->CreateStream(L"Stream1",STGM_READWRITE|STGM_SHARE_EXCLUS
> IVE|STGM_CREATE,
>       0,0,&pStream1);
>    if (FAILED(hr)) {
>       cout << "CreateStream Stream1 failed " << hr;
>       return -1;
>    }
>    hr =
> pStorage->CreateStream(L"Stream2",STGM_READWRITE|STGM_SHARE_EXCLUS
> IVE|STGM_CREATE,
>       0,0,&pStream2);
>    if (FAILED(hr)) {
>       cout << "CreateStream Stream2 failed " << hr;
>       return -1;
>    }
>    for (i=0;i<2048;++i) {
>       for (j=0;j<256;++j) {
>         // Hangs here
>          pStream1->Write(iData,sizeof(int)*1024,&dc);
>          pStream2->Write(iData,sizeof(int)*1024,&dc);
>       }
>       cout << "i = " << i << endl;
>    }
>    return 0;
> }
>
>
>
>
> ----------------------
> Terry Griffin
> terryg@datacube.com
>
> Web Systems Group
> Datacube, Inc.
> 300 Rosewood Drive
> Danvers, MA 01923
> (978) 777-4200
>
>

------------------------------

Date:    Wed, 6 Jan 1999 13:38:38 -0000
From:    "Darryl G. Wright" <darrylwright@MYMAIL.COM>
Subject: Detecting a call to the internet.

How do I detect when the user has somehow made an attempt at opening a
socket connection just like the dialup does? I would like to develop an app
that will detect a call to the net and place it 'on hold' while it starts my
dialer manually.

How do I intercept those calls? Where do I start?

Thanks

-=< Darryl >=-

------------------------------

Date:    Thu, 7 Jan 1999 02:01:45 +0800
From:    iban <iban@IHW.COM.CN>
Subject: How To Connect ODBC Data Source in NT SERVICES

This is a multi-part message in MIME format.

------=_NextPart_000_0030_01BE39E1.ADB99C80
Content-Type: text/plain;
        charset="gb2312"
Content-Transfer-Encoding: quoted-printable

HI,ALL
  Thanks Dan and Richard for giving the suggest on how to make=20
an NT services using Visual C++.
  I have a new problem in writing the codes.When I=20
try to connect an ODBC Source,it tells me Datasource
name not found and no driver specified.I have=20
just config it.What is happened?
Iban Bruce


------=_NextPart_000_0030_01BE39E1.ADB99C80
Content-Type: text/html;
        charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Dgb2312 http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>HI,ALL</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; Thanks Dan and Richard for giving the suggest =
on how to=20
make </FONT></DIV>
<DIV><FONT size=3D2>an NT services using Visual C++.</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; I have a new problem in writing the =
codes.When I=20
</FONT></DIV>
<DIV><FONT size=3D2>try to connect an ODBC Source,it tells me=20
Datasource</FONT></DIV>
<DIV><FONT size=3D2>name not found and no driver specified.I have =
</FONT></DIV>
<DIV><FONT size=3D2>just config it.What is happened?</FONT></DIV>
<DIV><FONT size=3D2>Iban Bruce</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0030_01BE39E1.ADB99C80--

------------------------------

Date:    Wed, 6 Jan 1999 12:31:35 -0600
From:    Jeff_Nygren_AT_PO20@CCMTA-DCC_MAIL_HUB.MAIL.DATACARD.COM
Subject: Re: I've seen *& (pointer to a reference?) Why use it?

This is 'passing a pointer by reference'. This would be used if func
modifies
the pointer being passed to it. If this is what is desired, the only other
way
to do it would be to pass a pointer to a pointer (type **parm). In the
first
case you would use "parm = &x;", but in the second case you would need
"*parm = &x" to do the same thing. (Assume these statements are in the body
 of
func().)

Jeff Nygren

______________________________ Reply Separator ____________________________
_____
Subject: I've seen *& (pointer to a reference?) Why use it?
Author:  "Microsoft Visual C++ programmers list"
<MSVC@PEACH.EASE.LSOFT.COM>
(David Cotton <David.Cotton@MARCGROUP.COM>) at DATACARD
Date:    1/6/99 3:45 PM






     I'm hoping that someone can give me a few hints as to why someone
     would use
     a function parameter like this:

     int func ( TmplClass<TypeClass> *&parm )

     What are the advantages over sending a regular pointer?

     This seems to override the benefit of a reference. i.e. References are
     implemented internally as a pointer but externally interface as a
     copy.
     Thus allowing access as a pointer, but prevents altering the pointer
     itself.

     So the essential question seems to be why would I use this construct?

     Thanks,
     Dave

     ----------------------------------------------------------------------
     ----
     The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
     international's LISTSERV(R) software.  For subscription/signoff info
     and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Thu, 7 Jan 1999 09:36:00 +0530
From:    mahesh.karajgi@DB.COM
Subject: returning a char pointer from a DLL

Hi,

Can any one help me out .
I have a  function   exported from a DLL specifically written  in  C for a
VB Client. There seems to be a problem if the function returns a char *
.The return value is a NULL if the DLL is created in release mode ,but the
same code works in a DLL created in debug mode

Bye

------------------------------

End of MSVC Digest - 5 Jan 1999 to 6 Jan 1999 (#1999-6)
*******************************************************
--
※ 转载:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.4]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店