Compile code for PowerNex OS
I have a code that I need to compile for PowerNex OS, which compiler should I use and how to compile code for PowerNex?
Re: Working with pointers/adresses
I have one more question. I tested the programm, as you said, it worked rarely because of OS restrictions. If I compile that code to dll, and run it through dll launcher, should it work?
Working with pointers/adresses
I'm learning now memory usage in D, and I have the problem that I can't solve. The problem is (The third step): 1) Programm gets number (In int format) as input data. 2) Integer is converted to HEX 3) Programm gets the data in 0x memory slot and writes it in the console.
How to compile to .bin/.iso format
Hi all! I have a programm in D (The simplest OS), which should be compiled into .bin or .iso format to be possible to run it on VirtualBox. How can I compile it to .bin / .iso format and which compiler should I use?
A custom name for variables
I need to create a variable with custom name, like this import std; void main() { string name; readf(" %s", &name); // some code that generates a variable of type integer and value 0 } Could you help me with that?
Working with cmd
Are there any libs which can be used to access cmd commands?
Re: To get memory from another process.
I've tried this on 64 bit, it works. But when I start VirtualBox with Windows 10 32-bit on it, it doesnt works.
Re: To get memory from another process.
I see this code imports drivers and does it depend on processor architecture? Would it work only on 64-bit or 32-bit or some special architechtures?
Re: To get memory from another process.
On Thursday, 9 April 2020 at 17:23:19 UTC, Quantium wrote: Anyway, messing with another, isolated processes is stuff that is highly specific to each operating system. Anyway, there are no generic answers to your question. This is hardcore systems programming. You should rather look at your OS documentation to see what is provided there. Ok. For training example, we're using Windows 10 Por. We can use WinAPI. Are there any D libs to use WinAPI? I mean Win 10 Pro, misprint :)
Re: To get memory from another process.
Anyway, messing with another, isolated processes is stuff that is highly specific to each operating system. Anyway, there are no generic answers to your question. This is hardcore systems programming. You should rather look at your OS documentation to see what is provided there. Ok. For training example, we're using Windows 10 Por. We can use WinAPI. Are there any D libs to use WinAPI?
Re: To get memory from another process.
On Wednesday, 8 April 2020 at 20:46:48 UTC, H. S. Teoh wrote: On Wed, Apr 08, 2020 at 08:16:27PM +, Quantium via Digitalmars-d-learn wrote: On Wednesday, 8 April 2020 at 16:25:01 UTC, Net wrote: [...] > As far I know, you can't access other's program memory in > any modern operating system. That's managed and protected > by the OS through virtual addressing. On Linux, you can access process memory using the virtual file /proc/$pid/mem, where $pid is the process ID. But you need root access for this to work, and you also need to know how the memory is mapped in the process (reading from an unmapped offset will return I/O error). > What are you trying to do? Now I know that programm even at Administrator mode cannot do this. Only system permission can do that. Or a driver on a kernel-level (zero level). So now the question is how to code driver, which gets other process' memory on D. This question has nothing to do with D. You need to know how your OS works, and whether it has an interface that provides the access you want. The programming language cannot give you this, and is also irrelevant as far as performing this operation is concerned; if you have an API that can do this, you can do it in any language. Also, I know antiviruses will try to block this driver so I'll test it with no antiviruses and Microsoft Defender off. Or if I'm mistaking anywhere and this is impossible on Windows, is it possible on Linux? You didn't answer the question. Why are you trying to access another process's memory? Without knowing what you're trying to do, it's hard to give you a more specific answer. T I'm trying to do this because I have very special programm that makes some calculations and on every calculation there is a hash in RAM. I need to get a one of hash values from a .bin file, and replace them. I mean hash in RAM of the programm is added to end of .bin file, and one of hashes from that file (I set up sorting algorithm by myself) is in RAM of programm.
Re: To get memory from another process.
On Wednesday, 8 April 2020 at 16:25:01 UTC, Net wrote: On Tuesday, 7 April 2020 at 21:20:28 UTC, Quantium wrote: Could you advise me how to do these steps on D? Which libs should I import? 1. My programm gets a path to exe file 2. My programm starts that exe file and writes into it 2 commands 3. Programm gets access to exe file memory 4. Programm gets data from process memory and writes it into data.bin file which is in the same directory. As I said, which libs do I need and how to get access to other process memory. Also, can I make this as a driver, but if yes, how to code driver on D? As far I know, you can't access other's program memory in any modern operating system. That's managed and protected by the OS through virtual addressing. What are you trying to do? Now I know that programm even at Administrator mode cannot do this. Only system permission can do that. Or a driver on a kernel-level (zero level). So now the question is how to code driver, which gets other process' memory on D. Also, I know antiviruses will try to block this driver so I'll test it with no antiviruses and Microsoft Defender off. Or if I'm mistaking anywhere and this is impossible on Windows, is it possible on Linux?
To get memory from another process.
Could you advise me how to do these steps on D? Which libs should I import? 1. My programm gets a path to exe file 2. My programm starts that exe file and writes into it 2 commands 3. Programm gets access to exe file memory 4. Programm gets data from process memory and writes it into data.bin file which is in the same directory. As I said, which libs do I need and how to get access to other process memory. Also, can I make this as a driver, but if yes, how to code driver on D?
Re: Discord bot written in D
On Tuesday, 7 April 2020 at 11:43:46 UTC, JN wrote: On Monday, 6 April 2020 at 21:23:22 UTC, Quantium wrote: Are there any libraries to creade a simple discord bot using D? And if you know these libraries, could you day me their pros and cons? There are four Discord API related libraries on code.dlang.org. Have you checked those? Yes, I've seen 2 or 3, but there isn't a good documentation. Also I don't know which of packages is better.
Discord bot written in D
Are there any libraries to creade a simple discord bot using D? And if you know these libraries, could you day me their pros and cons?
Dynamic twodimensial array
I know that to create a dynamic array: int[] m = new int[a]; where a is a variable. And if I need a twodimensial array, code int[][] m = new int[a][b]; where a and b are variables doesn't work. I used dmd compiler, it says: "Cannot read b at compile time" but there is new int, so array should be dynamic. Where is the problem in my code?
How to create an array with custom length?
Code int n=0; readf(" %d", &n); int[n] m; generated an error (DMD compiler): Cannot read n at compile time. How to create an array with custom length?
How to code Z-Function of string?
I cannot make a code that is calculating Z-Function of string. Main trouble is that string is immutable char[]. 1. How can I make string ONLY char[] (Not immutable) 2. How can I work with some of chars in the stirng, is, for example: string s="abc"; writeln(s[1]); // Should write 'b' or not??? Is it a legit code or it doesn't work ?
How to import C/C++ module from D?
If it is possible to import C/C++ , module or C/C++ Header from D, how to do it?