So, in this code:
[cpp]#include <iostream>
void aFunc(bool print);
int main() {
while (true) {
aFunc(false);
}
}
void aFunc(bool print) {
if (print) {
std::cout << "It works Facepunch!";
}
}[/cpp]
The program should never output "It works Facepunch!"
Knowing the code structure, how would I be able to call "aFunc(true)" from another program?
[QUOTE=Maurice;34055928]I have no fucking clue what is going on.
All I can see is scribbles.[/QUOTE]
You should get some perspective of the things
[QUOTE=synthiac;34055961]artwork by nullsquared[/QUOTE]Nah.
Programmer art is p. cool.
[QUOTE=synthiac;34055961]artwork by nullsquared[/QUOTE]
Was that entirely necessary?
[QUOTE=DrLuke;34054668]Aren't you afraid of being banned by VAC?[/QUOTE]
Not really. I know what would trigger VAC and can stay away from such methods. (Detours, huh)
Plus this is a Dev account where I would not care too much about a VAC ban.
[QUOTE=synthiac;34056054]have it push true instead of false before calling aFunc[/QUOTE]
Oops sorry. I meant how to call the function from another program. I feel stupid now for not mentioning it.
[QUOTE=synthiac;34056118]that's not directly possible.[/QUOTE]
Now I'm even more confused. amc posted that with a function signature, you could call it directly. Did I misinterpret what he said?
[QUOTE=awfa3;34056171]Now I'm even more confused. amc posted that with a function signature, you could call it directly. Did I misinterpret what he said?[/QUOTE]
I believe it is possible to call it externally, but the hacks are injected into the hl2.exe process.
[QUOTE=Nexus435;34056254]I believe it is possible to call it externally, but the hacks are injected into the hl2.exe process.[/QUOTE]
What does it mean to inject something into a process? Sorry a bit slow on my part.
[QUOTE=awfa3;34056321]What does it mean to inject something into a process? Sorry a bit slow on my part.[/QUOTE]
[url]http://en.wikipedia.org/wiki/DLL_injection[/url]
[QUOTE=ruarai;34056428]Nothing to see in this post.
[img]http://steamcommunity.com/actions/AddFriend/76561198004441359[/img][/QUOTE]
Doesn't work like that, lol.
[QUOTE=ruarai;34056428]Nothing to see in this post.
[img]http://steamcommunity.com/actions/AddFriend/76561198004441359[/img][/QUOTE]
[img]http://steamcommunity.com/actions/AddFriend/76561197982297709[/img] DURR GUYZ NOW I HAZ TONS OF FRIENDS AM I COOL YET?
Hmm, trying to work on programming again. Trying to convert most of the SFML 2 stuff to OpenTK. Good luck me.
[IMG]http://i.imgur.com/LUGKn.png[/IMG]
[QUOTE=awfa3;34055992]So, in this code:
[cpp]#include <iostream>
void aFunc(bool print);
int main() {
while (true) {
aFunc(false);
}
}
void aFunc(bool print) {
if (print) {
std::cout << "It works Facepunch!";
}
}[/cpp]
The program should never output "It works Facepunch!"
Knowing the code structure, how would I be able to call "aFunc(true)" from another program?[/QUOTE]
[QUOTE=synthiac;34056054]have it push true instead of false before calling aFunc
or hook main (wat) with something that calls it with true
or something like that idk kind of a weird example[/QUOTE]
[QUOTE=awfa3;34056078]Oops sorry. I meant how to call the function from another program. I feel stupid now for not mentioning it.[/QUOTE]
I understand what you're trying to get at, but the structure of your program would never allow you to print that message due to the execution flow you've written.
Let's assume you have a wildly different setup here, and that main, instead of calling on aFunc to do something, "listens" for things that are asked of by aFunc.
You could find the signature of aFunc, and call it with that signature, and pass whatever you wanted, allowing you to end up with a desired printed result.
I know this is still a bit ambiguous, but honestly I'm too lazy to write something in C/C++ that would explain my point.
My app finally got released on the app store:
[url]http://itunes.apple.com/app/improve-reading-skills/id491994132?mt=8[/url]
Nothing too fancy, just a simple app.
[QUOTE=synthiac;34056215]no, there's just a bit of ambiguity. you can call functions directly if you are within the same process space (for example, an injected module). calling functions directly from another process is not possible.[/QUOTE]
Couldn't you load an injected module that uses IPC? There's [url=http://www.codeproject.com/KB/threads/winspy.aspx]this[/url] article on codeproject (probably not the best resource, heh) that seems to not only explain how to do it, but why it works. Sure it's from 2003, but with Microsoft's track record for backwards compatibility, I'm sure it would still work just fine today. And if not, there's going to be some kind of COM going on from inside due to DirectX's use of their GUIDs, which you could then use over a network, which COM was effectively built for.
Heck even if you didn't use it in the above way you could load an injected module that talks to a background service, if you wanted.
[QUOTE=kankurou;34056959]My app finally got released on the app store:
[url]http://itunes.apple.com/app/improve-reading-skills/id491994132?mt=8[/url]
Nothing too fancy, just a simple app.[/QUOTE]
I'm gonna download this for my iPhone because it actually looks like a really cool concept. Nice job! Was it fun to make? I'd try my hand at iOS apps, but I'm too broke to afford a Mac right now.
My only feedback is that you should consider trying your best to stick to iOS UX.
[editline]4th January 2012[/editline]
[QUOTE=Chandler;34056983]Couldn't you load an injected module that uses IPC? There's [url=http://www.codeproject.com/KB/threads/winspy.aspx]this[/url] article on codeproject (probably not the best resource, heh) that seems to not only explain how to do it, but why it works. Sure it's from 2003, but with Microsoft's track record for backwards compatibility, I'm sure it would still work just fine today. And if not, there's going to be some kind of COM going on from inside due to DirectX's use of their GUIDs, which you could then use over a network, which COM was effectively built for.
Heck even if you didn't use it in the above way you could load an injected module that talks to a background service, if you wanted.[/QUOTE]
Wouldn't there be a thread issue?
[QUOTE=amcfaggot;34057020]I'm gonna download this for my iPhone because it actually looks like a really cool concept. Nice job! Was it fun to make? I'd try my hand at iOS apps, but I'm too broke to afford a Mac right now.
My only feedback is that you should consider trying your best to stick to iOS UX.
[editline]4th January 2012[/editline]
Wouldn't there be a thread issue?[/QUOTE]
Probably, but who cares, it's doable! :v:
[QUOTE=ruarai;34056428]-I am sorry-[/QUOTE]
What the fuck happened here.
[QUOTE=synthiac;34056860]hey guys check this out heheHEH LOL [IMG]http://i.imgur.com/nUC56.png[/IMG][/QUOTE]
hey guys i'm gonna criticize everyone and then post song-synced mazes every once in a while
can i join in with gradients and helvetica, i dont want to be left out of this cool-cats party
[QUOTE=amcfaggot;34057182]can i join in with gradients and helvetica, i dont want to be left out of this cool-cats party[/QUOTE]
yeah dude of course
i'll throw in some ugly art and then we can all have a nice circle-jerk over our big conglomerate of pixels!
[QUOTE=synthiac;34057242]hey null where's your ~revolutionary original app~ you said you were gonna post?[/QUOTE]
hey deloc where's your ~get the fuck out please~?
[QUOTE=amcfaggot;34056945]I understand what you're trying to get at, but the structure of your program would never allow you to print that message due to the execution flow you've written.
Let's assume you have a wildly different setup here, and that main, instead of calling on aFunc to do something, "listens" for things that are asked of by aFunc.
You could find the signature of aFunc, and call it with that signature, and pass whatever you wanted, allowing you to end up with a desired printed result.
I know this is still a bit ambiguous, but honestly I'm too lazy to write something in C/C++ that would explain my point.[/QUOTE]
:( Do you still have that SourceLua source code version that did the intel thing? I think I would be able to learn. Or atleast any code thingy that you have already written so you don't need to write anything new?
[QUOTE=synthiac;34057242]hey null where's your ~revolutionary original app~ you said you were gonna post?[/QUOTE]
it's not ready yet. it's a little more involved than an animated maze
[QUOTE=amcfaggot;34057020]I'm gonna download this for my iPhone because it actually looks like a really cool concept. Nice job! Was it fun to make? I'd try my hand at iOS apps, but I'm too broke to afford a Mac right now.
My only feedback is that you should consider trying your best to stick to iOS UX.
[/QUOTE]
Yeah, I made this app because I needed to learn some of the new features of iOS4-iOS5. Developing for the iPhone has gotten a lot easier over the years. If you develop even a single crappy game for the iPhone, chances are, you'll break even on your Mac hardware in about a few years (somehow the first app I ever made is still bringing in $1-$2 every couple of days) just from that single app.
[QUOTE=awfa3;34057265]:( Do you still have that SourceLua source code version that did the intel thing? I think I would be able to learn. Or atleast any code thingy that you have already written so you don't need to write anything new?[/QUOTE]
[url]http://hl2sb-src.googlecode.com/svn/trunk/src/utils/sourcelua/[/url]
[url]http://hl2sb-src.googlecode.com/svn/trunk/src/utils/sourcelua_swarm/[/url]
Here you go, babe. For Source Engine 2007 and Alien Swarm codebase, respectively. You may want to read up on sigscanning articles, if you need me to drop you some, me or the other more experienced ~hackery hackers~ here can give you a helping hand.
any of you guys ever done undo/redo functionality?
at first i went at it using the undo/redo "action" interface, which meant creating a class for every possible in-game action ... needless to say, this created a huge enormous mess
then i realized - all the game's necessary info is stored, tightly and efficiently, in the game's save-files ... so why not create a save-file stack for undo/redo functionality? then all i need to do is make a save-file every time the user change something
[cpp]
/* user action goes here, doesn't matter what it is */
UndoRedo* undoRedo = world->GetService<UndoRedo>();
undoRedo->Push();
[/cpp]
and tada, undo-redo Just Works
[cpp]
UndoRedo* undoRedo = world->GetService<UndoRedo>();
if (userWantsToUndo) undoRedo->Undo();
if (userWantsToRedo) undoRedo->Redo();
[/cpp]
[QUOTE=amcfaggot;34057583][url]http://hl2sb-src.googlecode.com/svn/trunk/src/utils/sourcelua/[/url]
[url]http://hl2sb-src.googlecode.com/svn/trunk/src/utils/sourcelua_swarm/[/url]
Here you go, babe. For Source Engine 2007 and Alien Swarm codebase, respectively. You may want to read up on sigscanning articles, if you need me to drop you some, me or the other more experienced ~hackery hackers~ here can give you a helping hand.[/QUOTE]
To understand sigscanning (did a quick google search) I should atleast understand a bit of assembly right?
Sorry, you need to Log In to post a reply to this thread.