|
m makeing ATL DLL using ATL COM Wizard
i m getting an error as follows
F:\rough work\atl2\atl2.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
for the line given below
[id(1), helpstring("method Connect")] HRESULT Connect(CString ip , int port);
how can i remove the eror
thanx
Regards.
|
|
|
|
|
I actually had previously used it to do console applications on Visual C++ but never used MFC before. I had a problem; I was told to set a 4 by 4 area by using Matrix in MFC coding and use it to check whether the image has any little "black spots". If it does, I have to set these small little "black spots" of the image from "255" or anything else to zero. The codings must be in a function.
So How do I do it?
Pls do kindly reply. I needed this asap. Thanks!
Below are the codes: (the codes have quite a bit of a problem...)
<br />
void CMediVisionView::MatrixImage()<br />
{<br />
int i;<br />
<br />
if(no_of_rows==512){<br />
for(i=0; i<512-5; i++)<br />
{<br />
if (image512[i]==0 && image512[i+1]==0 && image512[i+2]==0 && image512[i+3]==0 && image512[i+4]==0){<br />
<br />
if(image512[i]==0 && image512[i+512]==0 && image512[i+(512*2)]==0 && image512[i+(512*3)]==0){<br />
<br />
if(image512[i+4]==0 && image512[i+512+4]==0 && image512[i+(512*2)+4]==0 && image512[i+(512*3)+4]==0){<br />
<br />
if(image512[i+(512*3)+1]==0 && image512[i+(512*3)+2]==0 && image512[i+(512*3)+3]==0 && image512[i+(512*3)+4]==0){<br />
<br />
image512[i+512+1]=0;<br />
image512[i+(512*2)+1]=0;<br />
image512[i+(512*3)+1]=0;<br />
<br />
image512[i+512+2]=0;<br />
image512[i+(512*2)+2]=0;<br />
image512[i+(512*3)+2]=0;<br />
<br />
image512[i+512+3]=0;<br />
image512[i+(512*2)+3]=0;<br />
image512[i+(512*3)+3]=0;<br />
}<br />
<br />
}<br />
}<br />
<br />
}<br />
<br />
}<br />
}<br />
<br />
<br />
<br />
}<br />
|
|
|
|
|
i have a msflexigrid, works great, but i am wondering how to let the user click on a cell and copy the data inside of the cell (not edit the cell, just copy the data inside of the cell) ... any ideas?
|
|
|
|
|
Hello all,
I have an assignment to make a board game in VC++ .Net , I am required to make GUI and create 3 processes Master, player1 and player2....
I have been looking online for IPC and have found some examples but all went over the top of my head....
I would appreciate if someone could give me an example explaining...
create process ( i.e. initialize player1 from master )
pass data ( structure ) to player1
receive feedback from player1
pass data to player2 ( it has already been initialized before i.e after player1)
receive feedback from player2
pass data to player1( what will happen to player1 in the mean time? )
Thanks a lot
|
|
|
|
|
Hi Everyone,
Could anyone please give me details about controlling more than one parallel from the same CPU unit.
Thanx in advance
|
|
|
|
|
Each parallel port has it's own address that you scan, so the presence of any other parallel port is irrelevant. You use the address needed for the port you are scanning.
There are some good articles here on Code Project about parallel ports.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thanx for the reply Christian. Could that be done with MFC as well or just Win32 Applications.
|
|
|
|
|
MFC is just a fat old library on top of Win32. Hell, C# is just a fat old library on top of Win32. I actually do what I've described in C# by calling the underlying libaries in the DLL's. You can do anything Win32 supports in MFC.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Check latest release of GETIC 3D that comes with C++
source code for navigating in a 3D world .
http://getic.njoydeco.com
|
|
|
|
|
If you want to post it here, do it with an article.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
this kind of advertisement sucks!
Don't try it, just do it!
|
|
|
|
|
Just think before... Is no adv.
The package is for free, and comes with tutorials source code... but anyway...
|
|
|
|
|
can someone of you to send me the code of minesweeper,c++???plz help meeeeeeeee
|
|
|
|
|
|
if you mean the source code of the minesweeper distributed with windows then we can't help you. It is not public!
Don't try it, just do it!
|
|
|
|
|
i don't mean that..i want the source code of any minesweeper.i use it for an exrecise that ask the source code of minesweeper...someone to help me??
|
|
|
|
|
Has anyone encountered an error where CreateThread fails to create a thread but does not return NULL for a thread handle? Thanks.
|
|
|
|
|
Anonymous wrote:
Has anyone encountered an error where CreateThread fails to create a thread...
What are you doing to verify that CreateThread() has failed to create a thread?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
That would also have been my first question .
But I still have an additional one: Tell us more about the problem. For example you could post a small code passage here to make it easier for us to find out what has happened.
Don't try it, just do it!
|
|
|
|
|
Hello,
I am working on a Dll that can't create more than one thread instance and thus would like to know what I can do to prevent that from happening.
Thank you.
Dave
|
|
|
|
|
dNimrod#X wrote:
...a Dll that can't create more than one thread instance...
Are you wanting only one instance of the DLL to exist, or are you wanting the DLL to only be able to create one thread, or is the DLL failing to create more than one thread and you want to know how to create additional threads?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I also don't understand what this guy wants from us. It is very unclear. Are you meaning that you just want one thread created by the dll for every process, or do you mean only one thread for the whole system?
Don't try it, just do it!
|
|
|
|
|
I'm sorry if I wasn't clear enough... Allow me to explain what I need to do:
I have to create a Dll, which is loaded at startup time and should be accessible by any application. Among many different features, this Dll creates a kind of console for output purposes only. So, all applications loading the Dll, can get direct access to this "output console" (and other features.)
My problem is I can't let the Dll get duplicated each time an app loads it.
This is why I am asking you for your help as I have never attempted to do this in a Dll. Actually I have never had this need before.
What would you suggest me to do?
Dave
BTW:
Perhaps I can prevent this from happening if all the applications use GetModuleHandle , instead of loading them?
|
|
|
|
|
Hi
Am not sure if it will work or if its the correct way.
Created a shared variable, so that this variable will be shared among the all the loaded Dll.
#pragma data_seg(".DAT")
int NumberofInstance 0
#pragma data_seg()
..
..
NumberofInstance++;
if(NumberofInstance>1)
{
Dont load the DLL.
}
in the Def file add this
SECTIONS
.DAT Read Write Shared
Hope this will help you.
Regards
Mohamed Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Hi and thanks for the reply!
That is exactly what I need to do. I would have accomplished it by now if it wasn't for one thing: this Dll of mine has MFC support and thus I don't have access to the DllMain procedure! I do have access to CWinApp::InitInstance . How can I prevent the Dll from loading twice?
Perhaps I'm just confusing (and confused) with all this Dll business...
|
|
|
|