Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Yellow Box Definition Tips Disappear on VC++ platform (http://www.velocityreviews.com/forums/t314878-yellow-box-definition-tips-disappear-on-vc-platform.html)

alan 08-22-2003 02:26 AM

Yellow Box Definition Tips Disappear on VC++ platform
 
Hi all,

I have create a simple function and make a pure C dll. When I use this
DLL from my main program, I found I cannot see this function's
definition tips (yellow box).
It works fine, but no yellow box tips!
Here is my creating procedure,
[DLL]
-----------------------------------------------
#include <stdio.h>

__declspec(dllexport) int sum(int a, int b);

int sum(int a, int b)
{
return a+b;
}
-----------------------------------------------

[MAIN PROGRAM]
-----------------------------------------------
#include <stdio.h>
extern __declspec(dllimport) int sum(int a, int b);
void main()
{
int t;

t = sum(1,2); <-------------------my problem is here
printf("%d", t); When I type "sum(" , none
of
Yellow BOX tip appear.
}
-----------------------------------------------

If I use a standard function , such as printf(), the yellow box tip
will appear to remind me what parameters I should provide.

Can any body help me to make my program to show the yellow box tips
again?



Thank you very much.
Alan

Mike Wahler 08-22-2003 03:45 AM

Re: [OT, welcome msg, redir] Yellow Box Definition Tips Disappear on VC++ platform
 
alan <cheung_yuklun@i-cable.com> wrote in message
news:7bd5ab13.0308211826.6b245374@posting.google.c om...
> Hi all,
>
> I have create a simple function and make a pure C dll. When I use this
> DLL from my main program, I found I cannot see this function's
> definition tips (yellow box).
> It works fine, but no yellow box tips!
> Here is my creating procedure,
> [DLL]
> -----------------------------------------------
> #include <stdio.h>
>
> __declspec(dllexport) int sum(int a, int b);
>
> int sum(int a, int b)
> {
> return a+b;
> }
> -----------------------------------------------
>
> [MAIN PROGRAM]
> -----------------------------------------------
> #include <stdio.h>
> extern __declspec(dllimport) int sum(int a, int b);
> void main()
> {
> int t;
>
> t = sum(1,2); <-------------------my problem is here
> printf("%d", t); When I type "sum(" , none
> of
> Yellow BOX tip appear.
> }
> -----------------------------------------------
>
> If I use a standard function , such as printf(), the yellow box tip
> will appear to remind me what parameters I should provide.
>
> Can any body help me to make my program to show the yellow box tips
> again?


Someone can, but not here. This newsgroup is only
for ISO standard C, and not about any given development
environment.

Information about this newsgroup is at:
http://www.slack.net/~shiva/welcome.txt

The folks who can help you are at newsgroup
microsoft.public.vc.ide_general

HTH,
-Mike





Richard Heathfield 08-22-2003 03:57 AM

Re: Yellow Box Definition Tips Disappear on VC++ platform
 
alan wrote:

> Hi all,
>
> I have create a simple function and make a pure C dll. When I use this
> DLL from my main program, I found I cannot see this function's
> definition tips (yellow box).
> It works fine, but no yellow box tips!
> Here is my creating procedure,
> [DLL]
> -----------------------------------------------
> #include <stdio.h>
>
> __declspec(dllexport) int sum(int a, int b);


This __declspec thing - either it's a macro or it's a function call. If it's
a function call, you have a syntax error. If it's a macro, it would have to
expand to something like static, or extern, or perhaps nothing at all, in
order to be legal.

>
> int sum(int a, int b)
> {
> return a+b;
> }


This is okay unless the result of a+b overflows, in which case the behaviour
is undefined.

> -----------------------------------------------
>
> [MAIN PROGRAM]
> -----------------------------------------------
> #include <stdio.h>
> extern __declspec(dllimport) int sum(int a, int b);


Same problem as before with __declspec.

> void main()


int main(void)

> {
> int t;
>
> t = sum(1,2); <-------------------my problem is here
> printf("%d", t); When I type "sum(" , none
> of
> Yellow BOX tip appear.


The C Standard does not oblige your editor to give you yellow box tips, or
indeed box tips of any colour whatsoever.

> If I use a standard function , such as printf(), the yellow box tip
> will appear to remind me what parameters I should provide.


In the absence of such yellow box tips, why not check the declarator for the
function?

> Can any body help me to make my program to show the yellow box tips
> again?


printf("yellow box tips\n"); will display the words "yellow box tips", if
that helps you at all.

--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


All times are GMT. The time now is 02:35 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.