|
The functions are always called. But for a plain dll (not COM), you don't have to do anything in them. However, you could do some initialization and clean-up stuff but that's up to you.
|
|
|
|
|
Thanks! This is what I asked. Excellent. Straight forward & a neat reply.
modified on Wednesday, April 1, 2009 2:36 PM
|
|
|
|
|
i need to create a simple win32 dll in microsoft .net studio , i tried merely of times
i build everything successfully but in the debug folder there is no file with .dll extension
how can i build the dll successfully ?
is there anybody to help me please
i got these files in the debug folder
helloworld.obj
helloworld.bla bla .manifest
and other files but there is no .dll file?
how can i generate that please help
Human knowledge belongs to the world.
|
|
|
|
|
you can see the outPut path of project.
|
|
|
|
|
Come one level out from the current folder. You will again find folders named "Debug"/ "release". Your DLL will be relaxing there.
|
|
|
|
|
Have you selected right project! i.e. Window DLL
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I want to use the function GetAsyncKeyState(VK_LBUTTON) to test the state of the left mouse button.
Internet info page at:
http://msdn.microsoft.com/en-us/library/ms646293(VS.85).aspx
said that function uses user32.dll and import library User32.lib with the function declared in Winuser.h, include Windows.h
I haven't written code that uses dynamic link libraries. I am using Microsoft Visual C++ Version 6.0 and Windows XP
If I simply code
#include "Windows.h"
int state;
state = GetAsyncKeyState(VK_LBUTTON);
the code compiles but will always return zero as the value of state of the mouse button.
How do I use the dynamic link library in my simple program, so that the state of the mouse button can be read by my program?
Thanks!
|
|
|
|
|
What you did was correct. If you have problems, it's not because you failed to load the dll (otherwise the problem would occur earlier).
Are you sure you call that function at the correct place ? Where are you calling it ?
|
|
|
|
|
Here is my code. I have two loops, and during the execution of those loops I try to hit the mouse button, but always get zero when I test the state of the mouse button
void DoLoop(void)
{
long int count;
int value,i;
FILE *ofile;
ofile = fopen("test.txt","wt");
fprintf(ofile,"In Loop\n");
for (i = 0; i < 100; i++)
{
for (count=0; count < 1000000; count++)
{
value = GetAsyncKeyState(VK_LBUTTON);
if (value > 0) fprintf(ofile,"Value of VK_LBUTTON is %li\n",value);
}
printf("i = %i count = %li\n",i,count);
}
fclose(ofile);
}
|
|
|
|
|
are you pressing the LButton during execution of program? more over it's seems to be console based applciation? is i am correct?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Yes, you are correct. I just did a quick console application to test things. And yes I am pushing the mouse key during the execution.
|
|
|
|
|
I found the problem with my code. The function sets the most significant bit, so the value becomes negative. In my code I was testing for a value greater than zero instead of a non-zero value.
|
|
|
|
|
i need the code for Programming C of this question. urgent... anyone please help me...
must using "array" or "for loop"
1 1 1 1 1 0
1 1 1 1 0 2
1 1 1 0 2 2
1 1 0 2 2 2
1 0 2 2 2 2
0 2 2 2 2 2
modified on Wednesday, April 1, 2009 10:18 AM
|
|
|
|
|
int Matrix[6][6] =
{
{ 1, 1, 1, 1, 1, 0, },
{ 1, 1, 1, 1, 0, 2, },
{ 1, 1, 1, 0, 2, 2, },
{ 1, 1, 0, 2, 2, 2, },
{ 1, 0, 2, 2, 2, 2, },
{ 0, 2, 2, 2, 2, 2, }
};
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Good. Now, please show me how to make a matrix of 256x256.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Don't push me - I might just do it
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
int table[256][256];
int row;
int column;
for(row=0;row<256;row++)
{
for(column=0;column<256;column++)
printf("%d",table[row][column]);
printf("\n");
}
|
|
|
|
|
Sorry your code didn't pass the test, Can you spot why?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Why? what's really wrong? I don't find any. May be he's not assigning any value?
|
|
|
|
|
He made just one biiiiiiiiiig column (no blanks in the printf )!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ok
|
|
|
|
|
use loop
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i need do it using array list or for loop wan... thx
|
|
|
|
|
mmlyh08 wrote: array list
What do you mean by that? C has no such concept as an 'array list'.
If (as I suspect) this is a homework assignment - do it yourself. Homework's there for you to learn, not (just) because your teacher's a sadistic monster. And if you're not up to doing it...well, software development's not the career for you.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I'm really wondering who downvoted you . Anyway, I balanced the vote...
|
|
|
|
|