DLL注入的最佳实践?(Best Practices for DLL Injection?)
假设我想将DLL注入到每250毫秒编辑一次地址A的进程中。 我需要使用DllMain,对吧? 问题是我不允许在DllMain内等待。 所以我必须创建一个线程? 或者这不绕过限制? 我该怎么做呢?
另外,使用DLL注入来编辑应用程序的内存是否有任何好处?
另外,CreateThread中的堆栈大小应该是多少? 如果它太小或太大怎么办? 我怎么知道我需要多少钱?
Suppose I want to inject a DLL into a process that wants to edit the value of address A every 250 ms. I would need to use DllMain, right? The issue is that I'm not allowed to wait inside DllMain. So I would have to create a thread? Or does that not bypass the limitation? How would I go about doing this?
Also, are there any benefits for using DLL injection to edit the memory of an application over using an EXE?
Also, what should the stack size be in CreateThread? What if it is too small or too large? How do I know how much I need?
原文:https://stackoverflow.com/questions/16254721
最满意答案
我没有在ggplot中看到任何级别参数,并且为字符向量分配
levels
不应该起作用。 如果您尝试分配表达式向量,您应该只使用一个expression
调用并用逗号分隔参数,并且您应该在scale函数中使用labels参数:p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5, x>= 6, x>=7, x>= 8,x>=9, x>= 10) ) p
I do not see any levels arguments in ggplot and assigning
levels
to a character vector should not work. If you are trying to assign expression vectors you should just use oneexpression
call and separate the arguments by commas and you should use the labels argument in a scale function:p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5, x>= 6, x>=7, x>= 8,x>=9, x>= 10) ) p
相关问答
更多-
将因子转换为R中的数字(Convert the factor to numeric in R)[2022-05-27]
我们可以使用gsub删除,并转换为numeric类 w$V2 <- as.numeric(gsub(',', '', w$V2)) str(w) # 'data.frame': 2 obs. of 2 variables: # $ V1: int 10 9 # $ V2: num 1000 2000 We can remove the , with gsub and convert to numeric class w$V2 <- as.numeric(gsub(',', '', w$V2)) st ... -
数学注释在R(Mathematical Annotation in R)[2023-04-27]
我不确定这是一种正式的方式,但试试这个: plot(0,0,col=0) text(0, 0, expression(italic(0 <= {x <= 1}))) I'm not sure if this is a formal way, but try this: plot(0,0,col=0) text(0, 0, expression(italic(0 <= {x <= 1}))) -
在R中构建一个因子变量(Building a factor variable in R)[2022-03-28]
我将首先合成一些数据,因为你没有提供任何数据。 这只是一个随机样本。 df <- data.frame(Perpetrator.Sex = sample(c("M","F"), 50, replace = TRUE), Victim.Sex = sample(c("M","F"), 50, replace = TRUE), Perpetrator.Age = rnorm(50, mean=40, sd =10), ... -
你的意思是这样的......? x <- relevel(x, ref="male") # use `relevel` just to reorder levels > x.level <- levels(x) > x.level[1] [1] "male" > x.level[2] [1] "female" You mean something like this...? x <- relevel(x, ref="male") # use `relevel` just to reorder ...
-
如何在R中添加新的因子(how to add a new factor in R)[2024-03-03]
你不需要for循环,更快捷的方法是 a <- c("",1,2,3,2,2,1,3,"") > b <- c(1,2,3,4,5,3,8,2,8) > a1 <- as.factor(a) > f <- data.frame(x=a1,y=b) > > f$x <- ifelse(f$x=="",0,f$x) > f$x [1] 0 2 3 4 3 3 2 4 0 > f$x <- as.factor(f$x) > str(f) 'data.frame': 9 obs. of 2 variables ... -
如何在R中做数学和?(How to do a mathematical sum in R?)[2023-08-05]
使用sum命令和向量化操作: sum((x-mean(x))*(y-mean(y))) 这里的关键启示是求和函数只是取参数的总和(向量,矩阵,不管)。 在这种情况下,给它一个向量就足够了,在这种情况下,向量表达式比sum(z)复杂一点,但注意(x-mean(x))*(y-mean(y))计算结果为z ,所以这个命令稍微华丽的事实并不能真正改变函数的工作方式。 这在许多地方都是如此,而不仅仅是sum命令。 Use the sum command and vectorized operations: sum(( ... -
R - 因子加权值(Factor weighted values in)[2023-03-06]
您可以使用tapply按区域对权重求和(我认为这就是您的意思,但请澄清我是否误解): > df <- data.frame(region=sample(levels(state.region), 200, rep=T), weight=runif(200)) > summary(df$region) North Central Northeast South West 55 46 49 50 > ... -
在R中结合因子水平(Combining factor level in R)[2023-06-07]
一种选择是从car recode library(car) recode(x, "c('A', 'B')='A+B';c('D', 'E') = 'D+E'") #[1] A+B A+B A+B C D+E D+E A+B D+E C #Levels: A+B C D+E 它也应该与dplyr工作 library(dplyr) df %>% mutate(x= recode(x, "c('A', 'B')='A+B';c('D', 'E') = 'D+E'")) # x #1 A+B ... -
我没有在ggplot中看到任何级别参数,并且为字符向量分配levels不应该起作用。 如果您尝试分配表达式向量,您应该只使用一个expression调用并用逗号分隔参数,并且您应该在scale函数中使用labels参数: p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5, ...
-
R数学注释(R mathematical annotations)[2023-05-27]
这让你“在那里”(对于“那里”的某些定义): plot(1:10, xlab = expression("Likelihood, p" * (y[i] ~ "|" ~ o[j]))) This gets you "there" (for some definition of "there"): plot(1:10, xlab = expression("Likelihood, p" * (y[i] ~ "|" ~ o[j])))