Yellow Box Definition Tips Disappear on VC++ platform

A

alan

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
 
M

Mike Wahler

alan said:
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
 
R

Richard Heathfield

alan said:
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]

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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top