\Device\NUL
so what
You don't paste it manually, and it's not guaranteed to be constant between Windows version
imminent
You don't paste it manually, and it's not guaranteed to be constant between Windows version
no shit sherlock, you implement those classes urself and set the right offsets at runtime
\Device\NUL
https://ntdiff.github.io/#versionLeft=Win7%2Fx64%2FSystem32&filenameLeft=ntoskrnl.exe&typeLeft=Standalone%2F_RTL_USER_PROCESS_PARAMETERS&versionRight=Win10_1803_RS4%2Fx64%2FSystem32&filenameRight=ntoskrnl.exe&typeRight=Standalone%2F_RTL_USER_PROCESS_PARAMETERS It's changed
imminent
i don't think ur gonna target win7 nowadays lol
imminent
is it that you recompile the driver for each windows build or do it at runtime is whatever suits you
\Device\NUL
https://t.me/programminginc/515784 Here's my preferences, It's also supporting Kernel Mode beside User Mode
imminent
well, sometimes you need to dig deeper
𝔞ℓ𝔣𝓻𝒆ᵈ
Hi everyone
Devil
~~A~~
Can you help me how to
~~A~~
Start on C++
𝔞ℓ𝔣𝓻𝒆ᵈ
Can you help me how to
Hi Yes I'm here for helping
Ярина
Hello, if anyone knows OOP c++ and can help with some task, please write in private messages, I will be very grateful, I really need help
Rose
Purge complete.
Rose
Can you help me how to
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
\Device\NUL
Hello guys, i Need some help with Windows10 EPROCESS and ETHREAD kernel strutture, there isnt a good documentation
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ntos/ps/eprocess/index.htm Sadly the author has passed away 5 September ago
Chat Boss
Simple Sorcerer sent a code, it has been re-uploaded as a file
Simple Sorcerer
Hey, everybody. A small question. how to declare a static variable in a class function? it should be universal for each object I may be a bit wrong in the code, but the essence should be clear
Simple Sorcerer
class A{ A(){ <static> int val; // &val = universal printf( val ); } }; int main(){ A a1; // &val<1> A a2; // need &val<2> != &val<1> }
Simple Sorcerer
Of course you could just declare everything in private, but for me this option would be more convenient
Manav
Hey, everybody. A small question. how to declare a static variable in a class function? it should be universal for each object I may be a bit wrong in the code, but the essence should be clear
What do you mean a class function? Are you thinking of closures or limiting the static variable access just to a specific member variable?
Manav
If it's a static member variable you want, you can do: class A { static int val; } int A::val = 42; // required sepearate definition from declaration
Simple Sorcerer
Also it is not immediately obvious what you're trying to do
I need a variable to be available only within one object and destroyed together with it. A crude example is to simply declare a variable: int val; But I need to allocate memory only once
Manav
I need a variable to be available only within one object and destroyed together with it. A crude example is to simply declare a variable: int val; But I need to allocate memory only once
Hmm, your words contradict each other. One variable per object (per instance) means a member variable. And if you want one variable per class then that's a static member variable which i just showed you above.
Simple Sorcerer
couple of minutes
Chat Boss
Simple Sorcerer sent a code, it has been re-uploaded as a file
Simple Sorcerer
Here I have shown the memory allocation. it is very bad what I have done. but this is what I need. I need to initialise an expensive variable once for several functions, it would be more convenient to use one name for each function. But the problem with static is that I checked how memory is allocated, and if I create a second object, the variable with static also points to the same memory.
Manav
that's what static means in C++ when it's used inside class definition.
Manav
you use static for a member variable then it becomes unbounded to class instances, they can be initialized, in case of static data members (different from static member variables, but for your case it's the same) even if you don't have any object of the class.
Manav
just rename the variable as such, and store a pointer in the class. You can use typedefs if you want them to have a different names in each function.
Manav
can you explain what the lifetime of val1, val2 and val3 look like? you have three mallocs() so there are three different objects
Manav
malloc = bad example
can you share an example which looks more to what you're trying to do, or just paste the snippet of your actual code (if you're fine with sharing code to public places)
Manav
your malloc() example tells me that you want three static objects for the class
Manav
it's very big and ugly. So I've made a little example that everyone will understand.
well you haven't clearly told us what you want, that example is all i have.
Simple Sorcerer
let's go to the beginning. I need int val but that memory should be allocated for it only once within one object of a class. new class => fun => int val => delete class => delete val new class => fun => int val => delete class => delete val
Simple Sorcerer
I think this example is even worse than the ones above.
Manav
you have a variable that's associated to a class in some way, yes?
Manav
variable = private variable
ignore public or private for now
Manav
it needs to be associted to class, yes?
Simple Sorcerer
no
Simple Sorcerer
It's essentially unnecessary for the class to work
Simple Sorcerer
no
Manav
no
so then it is associated with the class then
Simple Sorcerer
yes......
Manav
okay
Manav
now to it's lifetime
Manav
does the variable has independent lifetime from the objects of the class?
Simple Sorcerer
yes......
but this variable is not used anywhere except in one function (each function has its own variable, looks like a simple int val declaration)
Simple Sorcerer
yes
Manav
you want that to be static? one allocation for all objects of that class
Simple Sorcerer
no
Simple Sorcerer
local variable = one object but one malloc for variable
Manav
local variable = one object but one malloc for variable
this is the part that doesn't make sense to me
Manav
lemme share code, wait a second
Simple Sorcerer
void fun(){ int val; // using val ..... }
Simple Sorcerer
but val = variable is created once
Chat Boss
Manav | avoid unnecessary messaging me sent a code, it has been re-uploaded as a file
Manav
Manav | avoid unnecessary messaging me sent a code, it has been re-uploaded as a file
with code formatting i feel like this bot hinders sharing code than actually helping
Manav
Manav | avoid unnecessary messaging me sent a code, it has been re-uploaded as a file
@simple_sorcerer for this snippet do you want three var1's? each for a1, a2 and a3 or just one var1 for all objects of type A
Manav
Yes, I need three such variables.
so you want three var1, one for each a1, a2 and a3?
Simple Sorcerer
with code formatting i feel like this bot hinders sharing code than actually helping
It would be great if it could turn only large code into a file.
Manav
yes
then you don't want static
Manav
static will have just one var1 for all a1, a2 and a3