473,587 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question About Example code, GlobalC

I'm a student who tries to use EliCZ's hooking library, AE5.6.

My ultimate purpose which I try to use EliCZ's library is preventing
users from copying data by windows clipboard.

So I Added this code to EliCZ's file 'GlobalCDLL.cpp '.

typedef HANDLE (WINAPI *TGetClipboardD ata)(UINT);
BYTE GetClipboardDat aSpace[32];
TGetClipboardDa ta OldGetClipboard Data =
(TGetClipboardD ata)&GetClipboa rdDataSpace;

HANDLE WINAPI NewGetClipboard Data(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugStri ng(_T("[GlobalC]NewGetClipboard Data"));
::EmptyClipboar d();
}

return OldGetClipboard Data(uFormat);
}

Of course, I Added API_HOOK struct of "GetClipboardDa ta" to hookchain.
Like This....
{"USER32.DLL ", "GetClipboardDa ta", HOOK_OVERWRITE | HOOK_HARD,
&OldGetClipboar dData,&UnhookGe tClipboardData,
NewGetClipboard Data}

This module works very well for Windows2k, WindowsXP....
However, That doesn't work for Windows98.
In Windows98, all modules in system are broken out.

Originally, isn't GlobarC.dll for Windows9x?

Has anybody ever used EliCZ's library for Windows9x OS?
Has anybody ever succeeded in hooking APIs in Windows9x OS?

If you can answer to my question, please give your opinion to me.

Thank you for Reading.
Nov 13 '05 #1
2 2087
bellparis <ga********@emp al.com> scribbled the following:
I'm a student who tries to use EliCZ's hooking library, AE5.6. My ultimate purpose which I try to use EliCZ's library is preventing
users from copying data by windows clipboard. So I Added this code to EliCZ's file 'GlobalCDLL.cpp '.
Hold it, hold it...
typedef HANDLE (WINAPI *TGetClipboardD ata)(UINT);
BYTE GetClipboardDat aSpace[32];
TGetClipboardDa ta OldGetClipboard Data =
(TGetClipboardD ata)&GetClipboa rdDataSpace; HANDLE WINAPI NewGetClipboard Data(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugStri ng(_T("[GlobalC]NewGetClipboard Data"));
::EmptyClipboar d();


No valid C program can ever contain a :: outside a string literal
or a comment. You're off-topic here.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Nothing lasts forever - so why not destroy it now?"
- Quake
Nov 13 '05 #2
bellparis wrote:
I'm a student who tries to use EliCZ's hooking library, AE5.6.
Even though the program language C has nothing about "hooking," I continue
in the hope that your problem might be about C ...
My ultimate purpose which I try to use EliCZ's library is preventing
users from copying data by windows clipboard.
It gets scarier: windows questions tend not to be about C ...
So I Added this code to EliCZ's file 'GlobalCDLL.cpp '.
Oh, no! The ".cpp" extension strongly suggests that your question is not
about C (as does the occurrence of the cursed string "DLL"). Still, it is
possible that your question is really about C ...
typedef HANDLE (WINAPI *TGetClipboardD ata)(UINT);
BYTE GetClipboardDat aSpace[32];
TGetClipboardDa ta OldGetClipboard Data =
(TGetClipboardD ata)&GetClipboa rdDataSpace;

HANDLE WINAPI NewGetClipboard Data(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugStri ng(_T("[GlobalC]NewGetClipboard Data"));
::EmptyClipboar d();
}


Ack! NAK! Not only are the identifiers 'HANDLE', 'WINAPI', 'UINT', 'BYTE',
and '_T' completely unknown in C, and the '_T' suspect on other grounds,
but the meaningless '::' marks this as being written in some obfuscating
language that definitely is *not* C. I fear that you are lost.


--
Martin Ambuhl

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
5035
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script...
33
3129
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic differences. Ok, Visual Studio has C++, VB and J++ thrown in plus some extra bells and whistles (I already have some minimal experience) but are both...
7
2324
by: Randell D. | last post by:
Folks, I have a Javascript performance question that I might have problems explaining... In PHP, better performance can be obtained dealing directly with a variable, as opposed to an element in an array... Thus, if I have a programming routine that utilises $a several times, it is better to write the value contained in $a to something...
55
4640
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's not obvious how the code works if you don't know the intricacies of the Property Let/Get syntax. Likewise, I dislike (and code to minimize the use...
14
1824
by: Mr Newbie | last post by:
I am often in the situation where I want to act on the result of a function, but a simple boolean is not enough. For example, I may have a function called isAuthorised ( User, Action ) as ????? OK, this function may return a boolean, and if this is true, then no message back is really required, but if it fails then some supporting message...
29
3556
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this one data field - but i'm not sure) :-) Background info:
6
1658
by: tshad | last post by:
I am playing with Inheritance and want to make sure I understand it. I have the following Classes: ******************************************* Public Class AuthHeader:Inherits SoapHeader Public AuthHeaderName As String Public SessionKey As String = "Default" End Class Public Class ServiceTicket:Inherits AuthHeader
3
1787
by: xllx.relient.xllx | last post by:
I have a question about an example presented in the book "INFORMIT C++ Reference Guide" by Danny Kalev: <code> string getmagicword() ( return string("Supercalifragilisticexpialidocious"); );
7
2440
by: Brave | last post by:
I have two questions about pulldown menus on forms. 1: Can I have the options of one pulldown menu be dictated by the choice from another pulldown menu (example beow)? 2: Can I have a form be submitted when a choice is made in a pulldown menu (example below)? Example of question 1:
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.