首页 > WinDriver > WD-易犯错误小记
2014四月21

WD-易犯错误小记

1._GsDriverEntry@8错误

举个简单的例子:

在.h文件中使用了

NTSTATUS DriverEntry(IN PDRIVER_OBJECT  pDriverObject,
			IN PUNICODE_STRING  pRegistryPath
			);

而在.cpp中却使用:

extern "C" NTSTATUS
DriverEntry(IN PDRIVER_OBJECT  pDriverObject,
			IN PUNICODE_STRING  pRegistryPath
			)

这时在编译时就会被提示_GsDriverEntry@8错误

解决方式:.h中也加上extern “C

很小的问题,但易错,一时还反应不过来,当时怎么看.cpp中的DriverEntry都觉得是正确的


2.hook时蓝屏

跟进了下,发现坑爹的写了以下代码:

unsigned char* curr,prev;

原来代码是:

typedef unsigned char* PBYTE
PBYTE curr,prev;

原代码当然没问题,新代码必崩,因为prev被声明成unsigned char了!


文章作者:hgy413
本文地址:https://hgy413.com/84.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

24 Responses to “WD-易犯错误小记”

  1. #1 minecraft 回复 | 引用 Post:2018-10-04 00:19

    A fascinating discussion is worth comment. There’s no doubt that
    that you should publish more about this topic, it might not
    be a taboo matter but usually people do not discuss such subjects.

    To the next! Many thanks!!

  2. #2 minecraft 回复 | 引用 Post:2018-10-05 12:32

    Asking questions are really nice thing if you are not understanding something totally, except this post presents fastidious understanding yet.

  3. #3 minecraft 回复 | 引用 Post:2018-10-05 15:59

    Great information. Lucky me I ran across your site by
    accident (stumbleupon). I have saved as a favorite for
    later!

  4. #4 minecraft 回复 | 引用 Post:2018-10-07 05:37

    I’ve been exploring for a little bit for any high quality articles or blog posts in this sort of space .
    Exploring in Yahoo I at last stumbled upon this web
    site. Studying this information So i’m glad to exhibit that I have an incredibly just right uncanny feeling I came upon exactly what I needed.
    I so much indisputably will make certain to don?t put
    out of your mind this website and provides it a look regularly.

  5. #5 tinder dating site 回复 | 引用 Post:2018-10-16 00:45

    We are a gaggle of volunteers and starting a new scheme in our community.
    Your site provided us with helpful information to work
    on. You have performed a formidable job and our entire community shall be grateful to you.

  6. #6 tinder dating site 回复 | 引用 Post:2018-10-16 13:07

    Hmm it appears like your website ate my first comment (it was super long) so I
    guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog blogger but I’m still new to
    everything. Do you have any suggestions for rookie blog writers?
    I’d certainly appreciate it.

  7. #7 Coconut Oil Benefits 回复 | 引用 Post:2018-10-23 03:34

    Oh my goodness! Incredible article dude! Many thanks, However
    I am going through difficulties with your RSS. I don’t understand why I cannot
    subscribe to it. Is there anyone else having the same RSS problems?
    Anybody who knows the answer will you kindly respond? Thanx!!

  8. #8 Coconut Oil Benefits 回复 | 引用 Post:2018-10-24 14:35

    Appreciate this post. Will try it out.

  9. #9 Coconut Oil 回复 | 引用 Post:2018-10-25 07:13

    Can you tell us more about this? I’d like to
    find out more details.

  10. #10 Coconut Oil Benefits 回复 | 引用 Post:2018-10-29 07:45

    I visited various web sites but the audio quality for audio songs present at this website is in fact superb.

  11. #11 Benefits of Coconut Oil 回复 | 引用 Post:2018-10-29 07:56

    You’re so awesome! I don’t believe I’ve truly read anything like that before.
    So good to discover somebody with some genuine thoughts on this topic.
    Seriously.. thanks for starting this up. This site is
    something that’s needed on the web, someone with a bit of originality!

  12. Descargar facebook
    Thankfulness to my father who told me concerning this webpage, this
    webpage is truly remarkable. Descargar facebook

  13. #13 quest bars cheap 回复 | 引用 Post:2018-11-03 08:08

    Hello there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for
    some targeted keywords but I’m not seeing very good
    success. If you know of any please share. Cheers!

  14. #14 quest bars cheap 回复 | 引用 Post:2018-11-03 08:34

    Great work! That is the type of information that should be shared across
    the web. Shame on Google for now not positioning this publish upper!
    Come on over and discuss with my site . Thank you =)

  15. #15 Quest Protein Bars 回复 | 引用 Post:2018-11-06 05:05

    Hmm is anyone else experiencing problems with the images on this blog loading?
    I’m trying to figure out if its a problem on my end or if it’s
    the blog. Any suggestions would be greatly appreciated.

  16. #16 quest bars 回复 | 引用 Post:2018-11-06 08:57

    What i do not realize is if truth be told how you’re now not
    really a lot more smartly-preferred than you might be now.
    You’re so intelligent. You know therefore significantly relating
    to this matter, produced me personally imagine it
    from so many numerous angles. Its like women and men don’t
    seem to be involved unless it is one thing to do with Woman gaga!
    Your personal stuffs nice. All the time care for
    it up!

  17. It’s amazing to pay a quick visit this web site and reading the views
    of all mates concerning this article, while I am also
    keen of getting knowledge.

  18. #18 Sling TV 回复 | 引用 Post:2018-11-10 21:08

    Great delivery. Sound arguments. Keep up the good spirit.

  19. When someone writes an article he/she keeps the idea of a user in his/her brain that how a user can be aware of it.
    Thus that’s why this article is perfect. Thanks!

  20. Thanks for another excellent article. The place else may just
    anyone get that type of information in such an ideal approach of writing?
    I have a presentation next week, and I’m on the search
    for such information.

  21. #21 descargar facebook 回复 | 引用 Post:2018-11-21 05:17

    Hi there! This post couldn’t be written any better!
    Looking through this post reminds me of my previous roommate!
    He continually kept preaching about this. I’ll forward this information to him.
    Pretty sure he will have a great read. Thanks for sharing!

  22. #22 all g 回复 | 引用 Post:2020-06-10 19:53

    I know this if off topic but I’m looking into starting
    my own blog and was wondering what all is required to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% positive.

    Any suggestions or advice would be greatly appreciated.
    Kudos

  23. #23 g 回复 | 引用 Post:2020-06-12 20:56

    Fastidious answer back in return of this question with genuine arguments and explaining the whole thing regarding that.

  24. #24 g 回复 | 引用 Post:2020-06-15 23:19

    Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year old daughter and
    said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.

    There was a hermit crab inside and it pinched
    her ear. She never wants to go back! LoL I know
    this is entirely off topic but I had to tell someone!

发表评论