{"id":5181,"date":"2014-07-21T04:24:32","date_gmt":"2014-07-20T19:24:32","guid":{"rendered":"https:\/\/mimumimu.net\/blog\/?p=5181"},"modified":"2014-07-21T04:24:32","modified_gmt":"2014-07-20T19:24:32","slug":"rtlunicodestring-%e7%b3%bb%e3%81%ae%e4%b8%80%e9%83%a8%e3%81%aeapi-%e3%81%af-32767-%e6%96%87%e5%ad%97%e4%bb%a5%e4%b8%8a%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84%e3%81%bf","status":"publish","type":"post","link":"https:\/\/mimumimu.net\/blog\/2014\/07\/21\/rtlunicodestring-%e7%b3%bb%e3%81%ae%e4%b8%80%e9%83%a8%e3%81%aeapi-%e3%81%af-32767-%e6%96%87%e5%ad%97%e4%bb%a5%e4%b8%8a%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84%e3%81%bf\/","title":{"rendered":"RtlUnicodeString.. \u7cfb\u306e\u4e00\u90e8\u306eAPI \u306f 32767 \u6587\u5b57\u4ee5\u4e0a\u3092\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u307f\u305f\u3044\u3067\u3059\u3002"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001\u307f\u3080\u3089\u3067\u3059\u3002<\/p>\n<p>\u3061\u3087\u3063\u3068\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u30c9\u30e9\u30a4\u30d0\u3092\u66f8\u3044\u3066\u3044\u307e\u3057\u3066\u3001   <br \/>RtlUnicodeStringPrintf \u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\u3059\u308b\u6642\u306b\u3001    <br \/>\u5909\u6570\u306e\u30b5\u30a4\u30ba\u3092 32767 \u6587\u5b57\u4ee5\u4e0a\u306b\u8a2d\u5b9a\u3059\u308b\u3068     <br \/>STATUS_INVALID_PARAMETER \u306b\u306a\u3063\u3066\u52d5\u304b\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u3055\u304b\u3068\u601d\u3063\u3066 32766 \u306b\u3059\u308b\u3068\u52d5\u304f\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u3068\u3057\u3066\u306f\u3053\u3093\u306a\u611f\u3058\uff1a<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:43353993-0593-4b39-a344-f4f6e5319a6a\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">\n<pre class=\"brush: c;\">UNICODE_STRING text = {0};\n\ntext.MaximumLength = 32767;\ntext.Buffer = ExAllocatePoolWithTag(PagedPool, text.MaximumLength, 0x3939);\ntext.Length = 0;\n\n\/\/ STATUS_INVALID_PARAMETER \u3067\u5931\u6557\u3059\u308b\u3002\nRtlUnicodeStringPrintf(&amp;text,L\"HELLO\");\n\n\n\/\/ STATUS_SUCCESS \u306b\u306a\u3063\u3066 text \u306b \"HELLO\" \u304c\u4ee3\u5165\u3055\u308c\u308b\u3002\ntext.MaximumLength = 32766;\nRtlUnicodeStringPrintf(&amp;text,L\"HELLO\");\n\nExFreePoolWithTag(text.Buffer,0x3939);<\/pre>\n<\/div>\n<p><\/p>\n<p>\u3067\u3082\u3063\u3066\u3001\u540c\u3058\u6587\u5b57\u5217\u64cd\u4f5c\u7cfb\u306e\u547d\u4ee4\u3067\u3082<br \/>\n  <br \/>RtlUnicodeStringCat \u306f\u52d5\u304f\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001 UNICODE_STRING \u306f<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:85af4179-b8a9-4b0a-a20a-cc1c4ce9521e\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">\n<pre class=\"brush: c;\">typedef struct _UNICODE_STRING {\n  USHORT Length;\n  USHORT MaximumLength;\n  PWSTR  Buffer;\n} UNICODE_STRING, *PUNICODE_STRING;\n<\/pre>\n<\/div>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u308b\u3002 ( <a title=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/ff564879(v=vs.85).aspx\" href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/ff564879(v=vs.85).aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/ff564879(v=vs.85).aspx<\/a> )<\/p>\n<p>&#160;<\/p>\n<p>\u8b0e\u3044\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u3063\u3066\u3053\u3068\u3067 MSDN \u306e\u8aac\u660e\u3092\u6ce8\u610f\u6df1\u304f\u8aad\u3093\u3067\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u305d\u3046\u3057\u307e\u3057\u305f\u3089\u3001\u53cc\u65b9\u306e \u201cDestinationString\u201d \u306e\u8aac\u660e\u306b\u5dee\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u3002<\/p>\n<p>&#160;<\/p>\n<p>RtlUnicodeStringPrintf:<\/p>\n<blockquote>\n<p><dt><em>DestinationString<\/em> [out] <\/dt>\n<dt>A pointer to a <strong>UNICODE_STRING<\/strong> structure that receives a formatted string. <strong>RtlUnicodeStringPrintf<\/strong> creates this string from the formatting string that <em>pszFormat<\/em> specifies and the function&#8217;s argument list. The maximum number of characters in the string is <strong><u>NTSTRSAFE_UNICODE_STRING_MAX_CCH<\/u><\/strong>.<\/dt>\n<\/p>\n<\/blockquote>\n<p>RtlUnicodeStringCat:<\/p>\n<blockquote>\n<p><dt><em>DestinationString<\/em> [in, out] <\/dt>\n<dt>A pointer to a <strong>UNICODE_STRING<\/strong> structure. This structure includes a buffer that, on input, contains a destination string to which the source string will be concatenated. On output, this buffer is the destination buffer that contains the entire resultant string. The source string is added to the end of the destination string. The maximum number of bytes in the structure&#8217;s string buffer is <u><strong>NTSTRSAFE_UNICODE_STRING_MAX_CCH * sizeof(WCHAR).<\/strong><\/u><\/dt>\n<\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>\u30fb\u30fb\u30fb\u306a\u3093\u3068\u3002\u3002\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u3067\u3082\u3063\u3066 ntstrsafe.h \u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b NTSTRSAFE_UNICODE_STRING_MAX_CCH \u3092\u898b\u3066\u307f\u307e\u3059\u3068\u3001<\/p>\n<blockquote>\n<p>#define NTSTRSAFE_UNICODE_STRING_MAX_CCH&#160;&#160;&#160; (0xffff \/ sizeof(wchar_t))&#160; <\/p>\n<\/blockquote>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u66f8\u3044\u3066\u3042\u308b\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u4f55\u3067\u53cc\u65b9\u306b\u9055\u3044\u304c\u3042\u308b\u306e\u304b\u306f\u3088\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u304c\u30fb\u30fb\u3002<br \/>\n  <br \/>\u3067\u3082\u30010xffff \u6587\u5b57\u66f8\u304d\u8fbc\u3081\u308b\u3082\u306e\u3068 0x7fff \u307e\u3067\u3057\u304b\u66f8\u304d\u8fbc\u3081\u306a\u3044\u3082\u306e\u3068\u304c\u3042\u308b\u3001<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3002\u3002<\/p>\n<p>\u3082\u3057\u6587\u5b57\u5217\u64cd\u4f5c\u7cfb\u3067\u3001<u><strong>\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u306f\u8db3\u308a\u3066\u3044\u308b\u306e\u306b\u683c\u7d0d\u3067\u304d\u306a\u3044\u5834\u5408<\/strong><\/u>\u306f<\/p>\n<p><strong><u>NTSTRSAFE_UNICODE_STRING_MAX_CCH \u3092\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d<\/u><\/strong>\u3057\u3066\u307f\u308b\u3068\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001\u307f\u3080\u3089\u3067\u3059\u3002 \u3061\u3087\u3063\u3068\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u30c9\u30e9\u30a4\u30d0\u3092\u66f8\u3044\u3066\u3044\u307e\u3057\u3066\u3001 RtlUnicodeStringPrintf \u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\u3059\u308b\u6642\u306b\u3001 \u5909\u6570\u306e\u30b5\u30a4\u30ba\u3092 32767 \u6587\u5b57\u4ee5\u4e0a\u306b\u8a2d\u5b9a\u3059\u308b\u3068 STATUS_INVA [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,7],"tags":[536,535,538,537],"class_list":["post-5181","post","type-post","status-publish","format-standard","hentry","category-windows","category-dev","tag-api","tag-rtlunicodestring","tag-538","tag-537"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/5181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/comments?post=5181"}],"version-history":[{"count":0,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/5181\/revisions"}],"wp:attachment":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/media?parent=5181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/categories?post=5181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/tags?post=5181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}