473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 *TGetClipboardData)(UINT);
BYTE GetClipboardDataSpace[32];
TGetClipboardData OldGetClipboardData =
(TGetClipboardData)&GetClipboardDataSpace;

HANDLE WINAPI NewGetClipboardData(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugString(_T("[GlobalC]NewGetClipboardData"));
::EmptyClipboard();
}

return OldGetClipboardData(uFormat);
}

Of course, I Added API_HOOK struct of "GetClipboardData" to hookchain.
Like This....
{"USER32.DLL", "GetClipboardData", HOOK_OVERWRITE | HOOK_HARD,
&OldGetClipboardData,&UnhookGetClipboardData,
NewGetClipboardData}

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 2070
bellparis <ga********@empal.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 *TGetClipboardData)(UINT);
BYTE GetClipboardDataSpace[32];
TGetClipboardData OldGetClipboardData =
(TGetClipboardData)&GetClipboardDataSpace; HANDLE WINAPI NewGetClipboardData(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugString(_T("[GlobalC]NewGetClipboardData"));
::EmptyClipboard();


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

--
/-- Joona Palaste (pa*****@cc.helsinki.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 *TGetClipboardData)(UINT);
BYTE GetClipboardDataSpace[32];
TGetClipboardData OldGetClipboardData =
(TGetClipboardData)&GetClipboardDataSpace;

HANDLE WINAPI NewGetClipboardData(UINT uFormat)
{
if ("Do I Must Prevent this copy work?")
{
OutputDebugString(_T("[GlobalC]NewGetClipboardData"));
::EmptyClipboard();
}


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
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...
33
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...
7
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...
55
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...
14
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 ?????...
29
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...
6
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...
3
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
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.