|
Can you add password protection via interop?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
"you can't "protect" it. Zip it and password protect that." This is what help me
Thank you for response
|
|
|
|
|
Password protection to enable/disable the opening of a file is not supported with OpenXML.
You can only lock the structure and windows of an OpenXML document and that is indeed what the wb.Protect() method does.
Sheet Protection · ClosedXML/ClosedXML Wiki · GitHub[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I Got my points,Thank you for your response.
|
|
|
|
|
Hello,
I am creating a immersive experience system for gaming and VR. Where the system controls LED light, seat vibration, gun recoil, depending on the feedback received from the game.
Sending data from the PC to the microcontroller over USB and control all these effects is done.
I am not able to get information on how to read these feedback data from game.
Thankyou
Harikrishna
|
|
|
|
|
Is this for a game you are developing? If so, you would send the appropriate "feedback" message yourself. If it's for other people's games, then you probably aren't going to be able to capture this.
|
|
|
|
|
Thank you for the replay.
I am not developing game, I wan to capture(read) feedback messages from game using C# or C++. This is to control external hardware like seat vibrate, LED light, gun recoil etc.
|
|
|
|
|
You can only capture what the game sends to you.
|
|
|
|
|
Feedback will depend on the hardware and software in use. Check the documentation for the game.
|
|
|
|
|
So you want to use "some" output from the game, so that you can generate e.g. seat vibration, gun recoil, flashing of LEDs etc - is that right?
If I get it right: You want to generate seat vibration, gun recoil etc., based on some other feedback from the game. What kind of game output do you want to capture to generate these effects? Text messages? Synthetic speech or other sounds generated by the game? Visual effects on the screen? Are you expecting to capture the image of a gun being fired, recognize it as such, and from that generate your recoil effect?
For a vintage text-only game (such as classical Adventure or MUD), text capture would be trivial and analyzing it reasonably simple. But if you want to generate additional effects triggred by sound or graphics, and do it in a general, game-independent way, then you are up for a huge task. You simply can't do it in any reasonable way. If text output is available only as graphic character images on the screen, you cannot even do text anlysis. (Well, you might try with some OCR functionality, but chances are that it would fail miserably.)
If you had access to the source code of the game, you could probably - as the game initiates sound/visible effects - write to a textual log an indication of the effect genereated, and route it to some output available to your recoil or vibration or whatever functions you want to add. It would require that you can modify the game source code, and it would be specific to that game.
If you are hoping to capture non-text output from an arbitrary game, without having to "get under the hood" of the game, I cannot see how you can make it.
|
|
|
|
|
Let me try a simple thing. Games send rumble (vibration) or FFB data to gamepad right? which gives information like how much vibration applied to which motor. Is there a way I can capture that messages?
|
|
|
|
|
It seems as if you assume that all sorts of output more or less by definition go through some standard code that is instrumented for hooking up listeners (or piping the information through a plugin for processing before bneing passed on).
While such hook (/plugin) mechanisms have become increasingly more common in recent years, they are always explicitly programmed in the software you want to hook into. It could be implemented in some library, not necessarily in the application specific code.
Games have always had extreme performace requirements, and they use a big bag of tricks to avoid a waste of resources. This is not where you would expect the developers to waste CPU cycles on checking the list of hooked procedures, both because there usually wouldn't be any, and because it could mess up time dependent routines, introducing unexpected delays. Game software often works at a low level with the hardware available, for performance reasons, avoiding over-generalized, less efficient libraries.
If these games e.g. use standard Windows message passing to communicate with that gamepad, you might be able to intercept those Windows messages. Don't expect it to be straightforward - sitting outside a process and spying on every Widows message it sends, opens a well of security holes. I wouldn't waste too much enery on it: Most likely, the game code talks directly to a harware driver that implements no hook mechanism.
Your safest bet would be to make a physical probe that senses the signal going to the gamepad. What kind of interface is used? For USB, you can find "breakout boxes" that listens to the data in and out lines: The very most primitive ones give you the physical line voltage; more fancy ones process it into digital messages. For wireless systems, e.g. Bluetooth, probes usually give you the payload of the BT frame, but don't expect any higher level protocol interpretation - these probes are essentially used by people working at the level of signal transmission, not application level protocols. Furthermore, BT traffic is frequently encrypted, which might give you trouble. Even though a USB breakout requires intercepting the cable, in may be a lot easier because the channel is nor likely to be encrypted.
|
|
|
|
|
The only thing that comes close to what you need is TV with "captions". If the game has a logging / PLAYBACK ability, you might be able to tap into that.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hello,
I have seen a retry loading in JAVA using "Quote: AjaxElementLocatorFactory ". Are there any equivalent class or usage in c# selenium automation library ?
Quote: public GoogleResultsPage() {
PageFactory.initElements(new AjaxElementLocatorFactory(driver, 15), this);
}
|
|
|
|
|
I have a standard C# .exe-file and inside it I have a byte[256] array with a counting sequence (0,1,2...254,255). If I open the .exe-file in a hex-editor, then I can easily find my counting sequence and edit the data in the array. But what if I want to make the array larger, what should I then do? I still want the .exe-file to work fine after the changes, so the purpose of the .exe-file is not just to hold array data.
|
|
|
|
|
Unless you have the sourcek, you can't. It's not just about the length of the declaration, but most loops inside the application would not expect a larger value.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Unless you have the source, you can't. Now, now, Mr. Vluggen. That's not a can-do attitude!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Richard Andrew x64 wrote: That's not a can-do attitude! Never claimed one; I'm rational.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
So what's the workaround? In embedded C-programming you can place things at specific addresses through the linker script. Is there not something similar in C# so I can place the array in the end of the file?
|
|
|
|
|
You could decompile the assembly; there's tools for that. That would probably be a breach of copyright.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Could you please provide more information on what that would allow me to do and how I would do that? Breach of copyright will not be a problem because I will write the code myself.
|
|
|
|
|
arnold_w wrote: Breach of copyright will not be a problem because I will write the code myself. It is; if you had written the assembly, you'd already have the sourcecode. Meaning you are modifying something that isn't yours. Also, copyright would mean that such things aren't allowed - even though it is technically possible.
If you can write the code, then the best way would be to indeed write the code yourself - meaning, a new application that does the same as the one you are now trying to hack.
See, most people here write code and it is their source of income. You are asking here how to change a compiled program - that code you want to change might be written by a member
If you seriously want to decompile, change the code to your needs and recompile (and no, not going to explain "what that allows you to do and how"), then Google should be able to explain that within a day.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
??? Conspiratorial much? I want to bake in an array of server paths into my .exe-file so I don't need an external file with that information. The number of paths could increase and hence I would need to make the array larger. Of course, I could assume a worst case scenario and allocate an array with a lot of empty space, but surely there must be a way to accomplish this? And btw, the .exe will modify the paths in the array itself, I don't want to have to recompile the code each time there are more paths.
|
|
|
|
|
arnold_w wrote: ??? Conspiratorial much? Not going to answer your questions anymore.
Enjoy.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
What you're trying to do is something that very, very few people ever mess around with let alone succeed at.
You're going to put FAR more work into writing another application that can modify your compiled application than you would EVER do by simply adding the servers to the source code and recompiling!
That's what you're doing with modifying an .EXE anyway, but you're just trying to do it the super-difficult way.
|
|
|
|