|
I note when people who help get a 1, my 5 averages to 4.6 or so, meaning a lot of the 1 voters are new members.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you.
Pits fall into Chuck Norris.
|
|
|
|
|
I think Chris must have implemented a value system - excellent .
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It's been that way for ages. As the top poster, I know that I can always exert at least equal influence to any 1 vote I disagree with, and almost always quite a bit more.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i created a dll....that uses the function..
headerfile
#ifndef _DLL_H_
#define _DLL_H_
#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */
DLLIMPORT LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
#endif /* _DLL_H_ */
cpp file
/* Replace "dll.h" with the name of your header */
#include "key.h"
#include <windows.h>
DLLIMPORT LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
//some code here.....
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
MessageBox( NULL,"Test working","cool",MB_OK | MB_ICONINFORMATION);
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
when im compiling this dll with Dev-C++ compiler..im getting error....
my compiler log is:
Compiler: Default compiler
Building Makefile: "D:\devcpp project\keylogger\testlogger\sysproc\Makefile.win"
Executing make...
make.exe -f "D:\devcpp project\keylogger\testlogger\sysproc\Makefile.win" all
g++.exe -c dllmain.cpp -o dllmain.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -DBUILDING_DLL=1
In file included from dllmain.cpp:2:
key.h:10: error: `LRESULT' does not name a type
make.exe: *** [dllmain.o] Error 1
Execution terminated
can someone please help me what im doing wrong...what im able to understand is that it is not able to get the declaration for LRESULT......
how to correc that.....
thanx in advance...dudes
|
|
|
|
|
Member 4449040 wrote: can someone please help me what im doing wrong
ASking here instead of the c++ forum. Windows Forms is plainly nothing to do with dlls, but it's actually the framework for windows apps in .NET
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a infragistics Cardview enabled WinGrid with 2 column. First column is having the column headers and second column is having the value for the first column. I want to Preview the data in the grid. For that I've used UltraPrintPreviewDialog control (Infragistics Control). Preview is generating for the grid, But the column alignment is changing (It first displays all the data in the first column and then the data in the second column). I want preview with First column data and then second column data in each row. How to get like this..? Can any one help me pls....
|
|
|
|
|
Hi, I have a Windows Forms application that was working just fine. Then I moved 2 controls on the form a few pixels and changed the size of the form. After that I got the following errors:
error C2039: 'Dispose' : is not a member of 'System::ComponentModel::IContainer'
error C2039: 'CurrentThread' : is not a member of 'System::Threading::Thread'
and 2 more errors that were caused by the above. Does anyone have an idea how to fix this?
|
|
|
|
|
Cleaning the solution solved the problem.
|
|
|
|
|
Hi everyone.. does anyone have an idea how to add new properties to standard controls like textbox.
thanks.
Software Developer
|
|
|
|
|
Obviously, you need to derive a class from TextBox, and add your property and whatever you want it to do, to the derived class.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
pseudocode
public class NewTextBox :System.Windows.Forms.Textbox
{
public property NewProperty as string
{
get{;}
set{;}
}
}
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
you could also use the Tag property or read about observer pattern..
|
|
|
|
|
Hi there,
Can you please help me with this problem.
I am trying to send my custom string to cacls command to set the permission on a file on my desktop. where the name is saved in a textfile, and loaded into a label named: SendThisTextToCaclsAsFilename
Here is a code snippet of what I have:
String^ customString = "/c echo y| cacls \"%HOMEDRIVE%\\Documents and Settings\\"%USERNAME%\\" + SendThisTextToCaclsAsFilename->Text + " /D Everyone";<br />
Process::Start("cmd.exe",customString);
Now the part that does not seem to work is this:
%USERNAME%\\" + SendThisTextToCaclsAsFilename->Text + " /D Everyone";
The /D Everyone is not part of the command, I think.
I can't see the error message that the command is showing, because obviously it only flashes when applying the permissions.
How can I make this work?
Thank You in advance!!
|
|
|
|
|
Johan13 wrote: "/c echo y| cacls \"%HOMEDRIVE%\\Documents and Settings\\"%USERNAME%\\"
Your command line would look like this:
cmd /c echo y| cacls "%HOMEDRIVE%\Documents and Settings"%USERNAME%\someText /D Everyone
There's a problem just before %USERNAME%. I think that line should look more like:
String^ customString = "/c echo y| cacls \"%HOMEDRIVE%\\Documents and Settings\\%USERNAME%\\" + SendThisTextToCaclsAsFilename->Text + "\" /D Everyone";
|
|
|
|
|
Great! Much Thanx, I'll give it a try!
|
|
|
|
|
How can I create a directory oon the current logged on user's desktop?
I have tried this with non luck!:
String^ FolderPath = "C:\\Documents and Settings\\%USERNAME%\\Desktop\\" + txtFolderName->Text; <br />
Directory::CreateDirectory(FolderPath);
And this:
String^ FolderPath = "C:\\Documents and Settings\ + Environment::UserName + \\Desktop\\" + txtFolderName->;Text;<br />
Directory::CreateDirectory(FolderPath);
Then I want to set deny permissions with .NET on that current logged on user directory I created above.
What namespaces is required for the .NET way? If possible!
Well this does'nt work:
String^ customString = "/c echo y| cacls \"%HOMEDRIVE%\\Documents and Settings\\%USERNAME%\\Desktop\\" + lblFolderName->Text + "\" /D Everyone";<br />
Process::Start("cmd.exe",customString);
And this also:
String^ customString = "/c echo y| cacls \"%HOMEDRIVE%\\Documents and Settings\\" + Environment::UserName + "\\Desktop\\" + lblFolderName->Text + "\" /D Everyone";<br />
Process::Start("cmd.exe",customString);
Much Thanx.
|
|
|
|
|
Why are you trying to deny permissions to Everyone on a folder that only the current logged in user can see anyway? The user wouldn't be able to see the contents of the folder, but there's nothing stopping that user from just going to the Security properties of it and resetting his own access permissions to it.
You're looking for the System.Security.AccessControl namespace (.NET 2.0 and above) to do this in your own code.
|
|
|
|
|
thanx, don't worry not trying to do it anymore. It was actually a silly thing to do.
btw. I have a policy the restrict the user access to security permissions.
|
|
|
|
|
|
Does anyone know if this is even possible?
|
|
|
|
|
I need to draw the sun path with respect to the given input(Latitude,Longitude,Altitude and Azimuth).Am using Directx 9 in my WinForms.How should i draw the sun path??Any help is appreciated..
Regards,
Priya
|
|
|
|
|
Why do you need DX ? That means you want it in 3D ?
Do you not know how to calculate the position, or not know how to draw it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I donno how to draw the sun path with the given input.Do i need to use any Directx tools or properties in .NET is enough?I dont have any idea of how to draw it.
|
|
|
|
|
Here's what I think you said.
I want to draw the path of the sun in a program. I have no idea about graphics programming, but I've heard of DirectX, so I figured if I posted here, someone would magically cause it all to make sense for me.
1 - DirectX is for drawing in 3D
2 - if you want to draw a static path, DirectX is overkill
3 - what do you mean ' the given input ' ?
You need to read up on the Graphics and Bitmap objects, then you need to get a handle on the maths you use to plot the path you want to draw.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|