Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WM" in [All]

gdi32

.

2äÈ`>ȽDãÈáìymè´âSwmãzoдйÖ!¿(fPAn:%È3:6øÊÉÿèº)[a©ÂçJó+Oäý„>A¼ØI¹d¸~—C!¦ÿô]y¾

.

    GRADIENT_FILL dwMode);           // gradient fill mode

.

    GRADIENT_FILL dwMode);           // Use either GRADIENT_FILL.RECT_H or GRADIENT_FILL.RECT_V. Using the value GRADIENT_FILL.TRIANGLE is wrong in this overload!

.

    GRADIENT_FILL dwMode);           // Use only GRADIENT_FILL.TRIANGLE. Both values GRADIENT_FILL.RECT_H and GRADIENT_FILL.RECT_V are wrong in this overload!

.

    private static extern int SendMessage(IntPtr hWnd, WindowsMessages wMsg, IntPtr wParam, IntPtr lParam);

.

        long result = SendMessage(HWND_BROADCAST, WindowsMessages.WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);

.

        Console.WriteLine(String.Format("WM_FONTCHANGE broadcast returned {0}", result));

.

        //Snipped for length - see the list of WM_ calls on this site.

.

static extern int SetROP2(IntPtr hdc, int fnDrawMode);

.

public struct WmfPlaceableFileHeader

.
Documentation
[WmfPlaceableFileHeader] on MSDN

difxapi

6: !!!
.

04¶§]ŠŸpÇÖÝ,ŠjÒÕêÏAaàsùzôÀA”Ú©| Ó±š^4©ù{ 0=¬ŽÈZ5¹>äõïwM}]Ûñf7

pdh

.

e¿uÕU «®Ô¤!èE¾4-}þYûZO øü2Höè&ã›;±{þwmè~€SZè¬y3zƎOƒGŸö£ö8ÁñNØo¦ÿ“uÂPڒTgÏÃ-ÿ‹á±w9Z¶«oÿ$WÊÞé

glu32

.

³)gC…3Dîs¿i¼érþØýäò[-Á¸>²uIv÷…jU8ç Æž[?f¢3ŘòaoÓø%œ¨A¿ï3›€–gév”×CaáŽ<Ñú$úŠ×š¢THËO•2±qYqg£’¼ÀÄl¼\•!{²\ ë¾­?œ¼ôæ•àÓDŒ­âˆ>n%xQäÉ å¨–ˆÜ!»¤«tÀÛü9™«Nsˆ«`½øq„ã´Ž¾”m<ø}ÇU‘@b,å —fUù'Œ¡ØÞTM£kÄI "ê­ÜVU.ZcxŒýÀHÚ°tœ&]Fö°ûj)µs.Çë´&¼!IÑqÌR91rq· …ežÏZ iç˜Áxe%¿…ð·ŸüšéhÃ*¦k yx#ÒÛ‹8­?æÅýa’x—)ÞÈ;·¦˜bÝxIO}"󦨎KïU†ñ’ÏøC¬ØÄäBJ`>|Ñû:Ï©tÞ&‚i™îðKO {ÈáXåšv‚äÐvwgK÷&ÃR€¤€ýV2F‹>‹$ÕdÞPü§`ÄqàŠ&¿¿üJNt³ʌÐIóCU³çÂWMé}Tþ•µA|Âúü7E$‚²©M먇Ð1-¹ÓíðÓlI-‹„ùQ#ÏWð®‡üô`7zÁ*¼áü ÙEàߺ„̔وÍÉGVq'`/©ÅÛc­S“T–…@¾ñ(?Z¥¦Ê!ÔBˆ‹Ÿ9ðf$¶ü±ìC½'{ <®Å}äƒH¾DÍ ×ÌÕ}hx׊Õ7wMñæØ¢}ñ­ÿÒW½fâ»ºV÷jç_˪Œ(¼µƒ;Ì锱€ðšSKò»$ôÀùžC;2û¿ÖS²t˄ [I¢!/BóûòÊNáL»å9’å'Èû½káîÜÍÓPêtål…fè~]4néXºÂSP-Üü:ÝH.Hbv$!“9©WîʜAZPÆ}Øò‡]ØÜBÒo¶yGv×Ðôˆ2¤©#í8¥ 1º\.:3’ZAÊð(24PÛÇE=wz)+ðeºêÍ2·ùÿ½"‘´ÍYß

imm32

.

ŒU-›³f ÊÊÏ¥l%Xꯆí2±{¿²€‡þM±­ØÆzo܂1K h éãKpMúµjògD±?ؑŽ=½8(­âD»ÊáÌö‰aßw“i0íŸjb¨K€ò"‹„ø´/ê›J‘Þ²°Äëé­¶x ßijsV–ú·N ‡ÙPk\Y ´X€ ç Ÿò^6(&kݺ/]0Û«@ ,k.6a…ŒÙ+è5,©U§Z€ù:1’`EâßrÀדØf™ÀmVÂьp`žXʐ_mp© Ѹ•tj t-ØðÓºÜî½Wº¿aþݜ‡mñ^buQT;ïx0«‹¶!KN9‡¶ŸLá4>눝ëÏýQ±’yp¾2=îqÕqk“#TM©YÐ~.DÎ͐‡=$ôsJÍx¾÷ëï˜É°»;ìþî8˜B‹)ð³¼ð Ô)äõ¼ñrTYÞÒw‚«JáfåDÓeŸ<±d•[,¥O¤I¦1E÷³ìÒhôçjð>#ÙxZ¶ú åCA¸Ÿ×*8ŸG¦hƒˆ»lE„è¶ã+ˆGʼnÑ÷XÚwMlæ=…q¸àÍÒ0ŸÐæw“y­ã

.

          UInt32 dwMode,  

fbwflib

.

¿Ýyö¦»>œ®=Äö±˜µ9MÄ6^³y/â-Ì–äe€Ÿ€¦ag¨ª„¤ßˎýE6Ç3/!)Í®ÔÃÛ'ÌO$8‚’cFwvŒÔrY h˜€zÑ8«£¢†CFÜN@#]¥­å|+ZÛ-ÉB᙭ô¯:±ŒI¯IÕ]x°¼=á3jìt¦s·³\íʺ•HãñûÞìÍÝs¥f3inÕµ\ý,9³Â'q~êvÿ¼Û›A2 Ë'žud1†ýÝF´-@XH–ZåV¡•Íϲþƒ•imú§IšDÇþÚJ‡ò'X'ûº˜®i»02¼r/Œ«Çwoœ‰þaˆ´ /kÒP–°iÊ?ЦúÜzNe‚är .ë.±ÈTNÉ(“°é >°SUQ\“æ×%Z©j’.V¨”Ž?!¿‡?%ÝÇm!¬Mփñ–T;&淏`‰'CNbK™hjfE –ý¸[Æ.»ü[êô}ˆòV2íHjš”Õwmøz¤ä§Ð`" ŽÀéÇøG)vdÐ0–5ØW8£}Ä¿zçÀzªž<Rær&ŠrÔ7P&É¡k³Ê‹áE'VµmEO‰ï±ÜeF ½^ô‹¾óÎ{¯(Y×~wWvˆ1²=îâvÞ¬z†—è@fÕg²_ÐJÃÖr·Ëv&m(}œ‡*‚°??µQ­mÁ\ª’Z•ÁRÿjdò .ULn"î.¡TPµ)¤ŒŸªd×J qKB·}؉´¦¿Ô: Nþ¦5·™ïó‘¥Ä¤ÿ…í¿oñ

12: !!
.

Ib Á…ÌøA él딮ùT>;´:žî‡ã5þÁ '‰ª>G>S›9`ËÚx.EHçüDHÝT˜­væã÷úæå®õí¨¶Õé@K1jFŒçÌx3Ñ¡èÕ ÈYBÔ, ´"¥´:D|OàLWMþF fî5½ø0Ï"õi«HÆ©®’Ÿ¨ë®˜£á¤úIŒØvûþõ2

oleaut32

.

ƒ›íWǀoY(’BR!92`šÄ$\­o¦iµ~dôË<£¸yžWóì†vèx‘#a½ü+CÏÚà›ïôõwüñuÙ»yxµ†YÀIð³z–k½ÊÌëQyò4u"ÙK–R?eœ,ÚÉY6,ÙÏ◧zM)n EÞ4o4Xž¸îòˆ¼|lÒÜËGò¥C+SQnÉq N»¾.i€pD&zÃï}Wâ jT"o_…‚'JéßuæôŠØ¯KÛ½ðx×¢ÎäÃo…2¾ð»l³¡¥2?'ëGk²|[P’uTàE¸²9òƒ.ö²ïšIú7@ Oâ¼ê„è;­$I½®»8tT@í¦Çºñ†ü§Ðã=½I‹aË(oȉû‹Ÿ:fDµ’·Ý‘eÛÔM8`ÆwM¤¹€ ùëóâ²|€[CÚ'ó)w¶'‹9ÖΦ©faPñÊ?Ñ,¡%D¦e§ºõ÷!Ü:êþÃ&±q+Œø_é˜õ`äð²yâpêjJ Ù $îÓf$ RÂ![ðâ b5üÓ

.

                    nResult = UnRegisterTypeLib(tlbAttr.guid, tlbAttr.wMajorVerNum, tlbAttr.wMinorVerNum, tlbAttr.lcid, tlbAttr.syskind)

winspool

.

î£RÒ´©ƒ?–¬z?ÖìÅ oƒ€DîÞ2£ŽV<¬4wj¬‹€æôC§"V|š6…ÆG—‹KbÜ3qøÔCûAhã̊HŽG:Íiä3]±Œ6ßC'V…ͭ˺/›•BägÃ[–ê=ù•ug緝x[°FB<@Ô#PtR ø•@b›zŒnYˆ÷\Ø?±¯ÑmHØaÄ<!ƒõFÒ®xpNF?»Ôf‰A÷=pãùÒÒ_EìQ‡Cú·µÈ¡àúw5½–{Øš°y»óí³ðŸB" Ýhd׃ó£jæk¨°Î~‚ñÌÿÔ§{/)ÈÁW,1L*Ø¿-yîñâ F—3ÿV׳ÔûúévöÀi9„±Ž?인pŸÑ½f¬˜BNïrxRþ•u•é_àӋ/otOýöß[E7|foIêwj e‚oٞ¿d’!àYŽü>d““YÖe5ì*̀ØRË?Ղ¯Ñ 2©Œ£îZ¤VN3”q#á}V %ïìÙìÀ›´cëÝØÅêKM/3ÝǓ9ìæÑWM€q#`ôü™¹Ër† Ĕ$k=,‹ÐØ%Sùw‚4³Èjì´tÖMb½5ÚÕèû—é÷·n}™Ä)G° O[u³ËÁ5ˆ&^i# Œò͏e¸@²µ8è%Ntvn;`BKv¢îõڟ´“Câ`¨–Õí±ÙYw…¦E[דœ›ÒZõCæ"'ú)L¿‡(Pç\Fðâ†Ìœ°•Ö

.

    Public wMonth As Short

.

    Public wMinute As Short

.

    Public wMilliseconds As Short

.

    pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

        pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

Turns out that there are some clever and powerful tools in Visual Studio 2005 and 2008 for working with the Management Classes (although couldn’t find it in the “Standard Edition” installed on this machine, definitely exists in my laptop’s Visual Studio). You can use Server Explorer to navigate a treeview to your management class (in this example, the Printers node), right-click on it and select “Generate Managed Class”. This will automagically create a strongly-typed C#.Net class representing the object model of the WMI Printers Class, with all its properties and methods.

wtsapi32

.

§ÈY~€aÒê7žÝ þh÷Tħc¼Ò¬N†@*™H·sè cz¸£ÜO•õwµ”?îʶ²' é=ÈÚge°b#Q_Cë±)2;HÆheCe:~ìŒáǧ«:‰«ºZó¸K·?u°ÁØ´´)›¹×¿þ5»öó”ó-¼¾oV3°yÔÀçÜ|B"™Ša¿¦L‚5Eíúÿؘý7øNtH_б$5fÇs²ƒîX6m¤5¡º`ÑÁUWM

.

    const int WM_WTSSESSION_CHANGE = 0x2b1;

.

        private const int WM_WTSSESSION_CHANGE = 0x2b1;

.

            if (m.Msg == WM_WTSSESSION_CHANGE)

comdlg32

.

#define OFN_ALLOWMULTISELECT 0x200

gdiplus

.

özâV”.ú‚#’¿ò_==y÷‰"‹¨†œw—¡™î²Ãô%4nm³1QébêP¤H?±M+·¨j”ØŒ8‘Ü-ŠjÁy´#å(bv^Kb,7É÷¢ÒÓËཋWÈPǁW…‰Ñ³ÉIòÐOêu9Cm¬>Çðc†:² ¾I„Xè%Ù¨ÔXfhTå]TlÕÆÁå_^±¯ü¹í«X¬wmï¢âi¾¤yP&'(£1$u«»!ò6ìÚ£6N-W%ÆÕȸ¤°Ûÿ ºŸ„åÚåbâ‘NÓݬ¿Èã¢äÙYo¾ ¸ã´Î+T‚©Ïy2›™aj¸Å¼Ðq×|UMóØÎ†všF’P¡±¿ƒÌ5:Ló“yBÐfR‰9ÔEΤߎoºL ßøÅ¹ÀP*±¥ûԗ²ÞB‡,fæ—òø×©=òû‹¾°ÀxX‘ûüMMSªªÄP´¶Æ@µ?ü: Ž{Ì}©HýXm¦} 1‘l3³F¥äÀ¹a¯<NƒßK†—º¡Å„;áED¦JV!\=žÍ!Ôs ½îНËþ</-„å ö¯öÞªj~ßV„ù`ùÛrbojÓßD¾‡Žàh\®ýûPkf}<‰bÐs‰÷´öYí B/¿8B’8VÜ)lÊ?T¦¶6ùAE³4­·óq.L«ôü k»[𨷇1å9<æß››@fñ‡.›K“ÓÚë+‘r£b™$A_Ïß

.

    /// Use the EmfToWmfBits function in the GDI+ specification to convert a

.

static extern IntPtr GdipEmfToWmfBits(HandleRef hEmf, uint uBufferSize,

.

    byte[] bBuffer, int iMappingMode, EmfToWmfBitsFlags flags);

.

private declare function GdipEmfToWmfBits lib "gdiplus.dll"(ByVal hEmf as IntPtr, _

.

    ByVal flags as EmfToWmfBitsFlags) as UInteger

.
Documentation
[GdipEmfToWmfBits] on MSDN

dtl

.

šÜ^1l½id fŠËae»E… qÓÓðט"uåÜ*y˜ˆøÀ­ÙË:̹$rs„‚ä7žšHƒÂðÙ%Rì û/c~–=)–ö<Ñ¢5 gõûâð¹å°Î`¿œûZíOvή粅kñIUÏ(&R½nÅäkNmsbÖ#Ó©«°"ˆ²,3AWÿŒþV­¬àªJLFåÜi>/æ¼™æ#KWMOßÖrƒ&Úÿ@{dðç/f'Í<Âýä{o¡Ž´åg9ü‰‡ª5͟AHlzô‘…åg­ÄÙôÊՙ]5ŠãçI$IPgFU1…@Á*¿(ÊÒr dhk‘8֊N—öhs<œ”)ާWbeèÏ Dqܺä†fuJ=„XPk­†}L¤˜)ÐOÂ.—0¸°èàiôú¶De-WCiÌ9̙†YbHœ‘‰E,ˆ çé ¸æÞ³mû›ísòÔÿͪÃ}>”[¥ça‚Ýáx÷»­³ë±åÂS´LB  Õ¶|2Qúô6¶AÌêO½ºÒÂa7PjuÚ)0r òdñVò6ÆÂzÜqgoˆŠy#f]îwÐ@—Sþç0¹…P«wՋlz’!ML“É’¼’3ʙ†Ü¿JèšóqªÐÄë‰ÔíˆÍAu0_͡㽡°ñmºX㉐ºöí˜÷µ%BØEnYЍrÀú ç`/`œºè^¬ž‰Lþõ`\›¡¢tÁ<VT‰¥cñëGð! â–ï¡›.Pâ6üádI—²Ñ2;¨!‡aÝûkºš`AÔ!HÎæ9<zËëCAÍO)ªÊrMQ¢¸Ð°)Q…¸Ð÷3¢u

icmp

24: !!!
.

;Ý:Ù÷3è™…|²å&†TrúØAç¨:±&iæÐ-Xî »¢ùü:ž—RµGe9¶ë.eFҁ¾'Ýq%,“'l&ÈQ2K¼–;ƒN®pq[öÄSì¸j~¯ùT¶ßk¯Pî4§~Á”³ãÚ˜WÕ¨WM,C˒SùNûQ_ž¿œÆ„Y7ܞثpÇçòÖÕýÔaK°d¬¼kç|ß<Ôr=> ·Ÿ2fV

kernel32

.

    public uint dwMajorVersion;

.

    public uint dwMinorVersion;

.

    Public dwMajorVersion As Integer

.

    Public dwMinorVersion As Integer

.

        Return (osv.dwMajorVersion = 5 And osv.dwMinorVersion = 2)

.

        Return (osv.wProductType = VER_NT_WORKSTATION And osv.dwMajorVersion = 6)

.

        uint dwMode

.

        public COORD dwMaximumWindowSize;

.

        public COORD dwMaximumWindowSize;

.

        public COORD dwMousePosition;

.

    uint dwMaximumSizeHigh,

.

    uint dwMaximumSizeLow,

.

    dwMaximumSizeHigh As UInteger, _

.

    dwMaximumSizeLow As UInteger, _

.

    private static extern IntPtr CreateFileMapping(IntPtr hFile, IntPtr lpAttributes, FileMapProtection flProtect, Int32 dwMaxSizeHi, Int32 dwMaxSizeLow, string lpName);

.

    uint dwMaximumSizeHigh,

.

    uint dwMaximumSizeLow,

.

    dwMaximumSizeHigh As UInteger, _

.

    dwMaximumSizeLow As UInteger, _

.

    private static extern IntPtr CreateFileMapping(IntPtr hFile, IntPtr lpAttributes, FileMapProtection flProtect, Int32 dwMaxSizeHi, Int32 dwMaxSizeLow, string lpName);

.

    LowMemoryResourceNotification = 0,

.

       Dim wMoreVendorUnique As Short

.

       Dim wMultSectorStuff As Short

.

       Dim wMultiWordDMA As Short

.

       Public dwMajorVersion As Integer

.

       Public dwMinorVersion As Integer

.

   uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer,

.

   uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer,

.

   uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer,

.

static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer, uint nSize, string[] Arguments);

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByRef lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As [String], ByVal nSize As Integer, ByRef Arguments As IntPtr) As Integer

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, <MarshalAs(UnmanageType.LPWStr)> ByRef lpBuffer As String, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As StringBuilder, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

   uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer,

.

   uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer,

.

   uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer,

.

static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer, uint nSize, string[] Arguments);

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByRef lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As [String], ByVal nSize As Integer, ByRef Arguments As IntPtr) As Integer

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, <MarshalAs(UnmanageType.LPWStr)> ByRef lpBuffer As String, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As StringBuilder, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

    Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByRef lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As IntPtr, ByVal nSize As Integer, ByRef Arguments As IntPtr) As Integer

.

        public COORD dwMaximumWindowSize;

.

        public COORD dwMaximumWindowSize;

.

     ShowMinimized = 2

.

     ShowMaximized = 3

.

     ShowMinNoActive = 7

.

    ShowWindow(hwnd, ShowWindowCommands.ShowMinimized)

.

   uint dwMilliseconds);

.

  /// A SystemTime structure that contains a date and local time when the transition from daylight saving time to standard time occurs on this operating system. If the time zone does not support daylight saving time or if the caller needs to disable daylight saving time, the wMonth member in the SystemTime structure must be zero. If this date is specified, the DaylightDate value in the TimeZoneInformation structure must also be specified. Otherwise, the system assumes the time zone data is invalid and no changes will be applied.

.

  /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

  /// <para>Using this notation, specify the 2:00a.m. on the first Sunday in April as follows: wHour = 2, wMonth = 4, wDayOfWeek = 0, wDay = 1. Specify 2:00a.m. on the last Thursday in October as follows: wHour = 2, wMonth = 10, wDayOfWeek = 4, wDay = 5.</para>

.

  /// A SystemTime structure that contains a date and local time when the transition from standard time to daylight saving time occurs on this operating system. If the time zone does not support daylight saving time or if the caller needs to disable daylight saving time, the wMonth member in the SystemTime structure must be zero. If this date is specified, the StandardDate value in the TimeZoneInformation structure must also be specified. Otherwise, the system assumes the time zone data is invalid and no changes will be applied.

.

  /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

The CLR offers us no way to tell if memory is getting tight. Many think that this API provides the best solution. This is mentioned by Jeffrey Richter in his book 'CLR via C#' ISBN: 0-7356-2163-2. It is useful in determining if your system is under excessive memory load by looking at the dwMemoryLoad member of the MEMORYSTATUSEX structure. If this value is > 80 (per Mr. Richter in his discussion of Garbage Collection), it is an indication that you might want to consider converting some strong references into weak references. Remember that a weakreference type will be collected when Generation 0 is full, so it is not a good technique for caching (as many seem to think).

.

                      _MemoryLoad = msex.dwMemoryLoad;

.

            public uint dwMemoryLoad;

.

The CLR offers us no way to tell if memory is getting tight. Many think that this API provides the best solution. This is mentioned by Jeffrey Richter in his book 'CLR via C#' ISBN: 0-7356-2163-2. It is useful in determining if your system is under excessive memory load by looking at the dwMemoryLoad member of the MEMORYSTATUSEX structure. If this value is > 80 (per Mr. Richter in his discussion of Garbage Collection), it is an indication that you might want to consider converting some strong references into weak references. Remember that a weakreference type will be collected when Generation 0 is full, so it is not a good technique for caching (as many seem to think).

.

                      _MemoryLoad = msex.dwMemoryLoad;

.

            public uint dwMemoryLoad;

.

   UIntPtr dwMaximumSize);

.

        Return (osv.dwMajorVersion = 5 And osv.dwMinorVersion = 2) And _

.

             (osv.dwMajorVersion = 6) And IsWow64()

.

     uint dwMapFlags,        //  DWORD        dwMapFlags

.

     uint dwMapFlags = LCMAP_LOWERCASE;

.

     nSize = LCMapStringEx(LOCALE_NAME_SYSTEM_DEFAULT, dwMapFlags, src, nLen, IntPtr.Zero, 0, pZero, pZero, pZero);

.

         nSize = LCMapStringEx(LOCALE_NAME_SYSTEM_DEFAULT, dwMapFlags, src, nLen, ptr, nSize, pZero, pZero, pZero);

.

For a Windows application that is being updated, the last opportunity to call this function is while processing the WM_QUERYENDSESSION message. For a console application that is being updated, the registration must occur before the installer tries to shutdown the application (you need to keep the registration current; you cannot call this function when handling the CTRL_C_EVENT notification).

.

static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);

.

        public COORD dwMaximumWindowSize;

.

        internal COORD dwMaximumWindowSize;

.

    int wmain() {

.

   IntPtr lpNewFilePointer, uint dwMoveMethod);

.

     out long lpNewFilePointer, uint dwMoveMethod);

.

   IntPtr lpNewFilePointer, uint dwMoveMethod);

.

     out long lpNewFilePointer, uint dwMoveMethod);

.

static extern bool SetHandleInformation(IntPtr hObject, HANDLE_FLAGS dwMask,

.

            public ushort wMonth;

.

            public ushort wMinute;

.

            public ushort wMilliseconds;

.

                wMonth = (ushort)time.Month;

.

                wMinute = (ushort)time.Minute;

.

                wMilliseconds = (ushort)time.Millisecond;

.

                return new DateTime(wYear, wMonth, wDay, wHour, wMinute, wSecond, wMilliseconds);

.

   dwMinimumWorkingSetSize, UIntPtr dwMaximumWorkingSetSize);

.

     Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal dwMinimumWorkingSetSize As Int32, ByVal dwMaximumWorkingSetSize As Int32) As Int32

.

Might be better written using int instead of UInt as -1 is a valid value for dwMaximumWorkingSetSize and dwMinimumWorkingSetSize. See Sample Code.

.

        {    public ushort wYear,wMonth,wDayOfWeek,wDay,

.

                wHour,wMinute,wSecond,wMilliseconds;

.

static extern bool SetThreadErrorMode(UInt32 dwNewMode, out UInt32 lpOldMode);

.

Declare Function SetThreadErrorMode Lib "kernel32.dll" (ByVal dwNewMode as System.UInt32, ByRef lpOldMode as System.UInt32) As System.Boolean

.

    void AllowMonitorPowerdown ()

.

There is a message (WM_SETTINGCHANGE) you can send in order to notify the active windows that there has been a configuration change using the SendMessageTimeout function.

.

        /// A SystemTime structure that contains a date and local time when the transition from daylight saving time to standard time occurs on this operating system. If the time zone does not support daylight saving time or if the caller needs to disable daylight saving time, the wMonth member in the SystemTime structure must be zero. If this date is specified, the DaylightDate value in the TimeZoneInformation structure must also be specified. Otherwise, the system assumes the time zone data is invalid and no changes will be applied.

.

        /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

.

        /// <para>Using this notation, specify the 2:00a.m. on the first Sunday in April as follows: wHour = 2, wMonth = 4, wDayOfWeek = 0, wDay = 1. Specify 2:00a.m. on the last Thursday in October as follows: wHour = 2, wMonth = 10, wDayOfWeek = 4, wDay = 5.</para>

.

        /// A SystemTime structure that contains a date and local time when the transition from standard time to daylight saving time occurs on this operating system. If the time zone does not support daylight saving time or if the caller needs to disable daylight saving time, the wMonth member in the SystemTime structure must be zero. If this date is specified, the StandardDate value in the TimeZoneInformation structure must also be specified. Otherwise, the system assumes the time zone data is invalid and no changes will be applied.

.

        /// <para>To select the correct day in the month, set the wYear member to zero, the wHour and wMinute members to the transition time, the wDayOfWeek member to the appropriate weekday, and the wDay member to indicate the occurence of the day of the week within the month (first through fifth).</para>

55: Sleep
.

static extern void Sleep(uint dwMilliseconds);

.

Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

.

static extern void Sleep(uint dwMilliseconds);

.

Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

.

   public uint dwMajorVersion;

.

   public uint dwMinorVersion;

.

public static extern bool WaitForDebugEvent(ref DEBUG_EVENT lpDebugEvent, uint dwMilliseconds );

.

   bool bWaitAll, uint dwMilliseconds);

.

  static extern UInt32 WaitForSingleObject(IntPtr hHandle, UInt32 dwMilliseconds);

.

static def WaitForSingleObject(hHandle as IntPtr, dwMilliseconds as uint) as uint:

dwmapi

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: