1 00:00:00,120 --> 00:00:05,700 So in the spirit of what we're doing, how to utilize these windows if we are using this, you shot. 2 00:00:05,880 --> 00:00:14,180 So in this movie I will be using this message function to generate a graphical user interface message 3 00:00:14,430 --> 00:00:15,230 small pop up. 4 00:00:15,930 --> 00:00:18,660 So before that I was talking about the data types. 5 00:00:18,870 --> 00:00:26,040 So here you can see unmanaged type in Windows abuse and C language type for running. 6 00:00:26,040 --> 00:00:28,620 C, you need to use these data types. 7 00:00:28,950 --> 00:00:31,870 But C-sharp is manager correctly. 8 00:00:32,000 --> 00:00:36,780 That means this C-sharp chord is controlled and managed by ACL. 9 00:00:37,350 --> 00:00:42,210 So if you if there is no ACL around this system, there is not Darknet installed. 10 00:00:42,540 --> 00:00:45,320 You can't run these C-sharp binaries. 11 00:00:45,330 --> 00:00:51,120 So you need to have this here are loaded to load our to run our binaries. 12 00:00:51,960 --> 00:00:55,410 So in order to access these functions, you need to. 13 00:00:58,460 --> 00:01:00,190 Well, import this idea first. 14 00:01:00,350 --> 00:01:05,330 So if you go down to this function, you will see the user that you do not be. 15 00:01:05,660 --> 00:01:10,610 So this function message box resides in this audience. 16 00:01:10,610 --> 00:01:13,190 So ladies are exactly seem like executives. 17 00:01:13,460 --> 00:01:14,990 But we cannot exclude them. 18 00:01:15,020 --> 00:01:17,480 We can only load functions from this. 19 00:01:17,810 --> 00:01:27,440 So many processes use this data so that the analysis, many processes can access the functions in the. 20 00:01:28,750 --> 00:01:32,710 One day without having the multiple number of copies. 21 00:01:32,950 --> 00:01:44,200 So I how in process accessing this message box function without having pen it so one day you can answer 22 00:01:44,200 --> 00:01:46,080 these functions for many process. 23 00:01:46,090 --> 00:01:48,340 So that is the advantage of this reader first. 24 00:01:50,260 --> 00:01:54,370 So here you can see the manager typing the shot for why this is not why. 25 00:01:54,730 --> 00:02:00,100 And you can see in the pointer and write in in 16, etc.. 26 00:02:00,100 --> 00:02:03,100 So here you can see all of these, uh. 27 00:02:05,280 --> 00:02:06,130 Manage it better. 28 00:02:06,750 --> 00:02:09,510 So one thing you need to notice is match box. 29 00:02:09,600 --> 00:02:16,740 WWE stands for white character for the Unicode and you can also see message box here that is for as 30 00:02:16,740 --> 00:02:17,220 question. 31 00:02:17,880 --> 00:02:22,020 So you need to pass the strings as a unicode once. 32 00:02:26,080 --> 00:02:33,250 We need to import a namespace card system that runtime not interrupt services. 33 00:02:34,560 --> 00:02:38,040 From this, we need to import the functions from here. 34 00:02:38,310 --> 00:02:43,770 So before that, now in my class I can to brackets the import. 35 00:02:44,970 --> 00:02:46,790 I need to specify the bearer name. 36 00:02:46,830 --> 00:02:52,560 You know, this has been through the actual part already. 37 00:02:52,560 --> 00:02:54,930 This part will be. 38 00:02:56,780 --> 00:03:02,450 So automatically I can just say user that you do not be and. 39 00:03:05,460 --> 00:03:06,090 Below this. 40 00:03:06,300 --> 00:03:09,240 What we need to do is we need to define our function. 41 00:03:11,260 --> 00:03:14,630 And public static extend message. 42 00:03:14,950 --> 00:03:21,400 W So we are using the extent to indicate that this is an outside function and this function does not 43 00:03:21,400 --> 00:03:24,280 have any knowledge about this. 44 00:03:24,280 --> 00:03:25,840 Our program class. 45 00:03:27,560 --> 00:03:29,840 So it has a return that is integer. 46 00:03:32,970 --> 00:03:42,690 So much as w so I'm making this, uh, like, uh, multiple lines because there'll be some functions 47 00:03:42,690 --> 00:03:46,710 that require more than five or six parameters in that you cannot write in single line. 48 00:03:50,290 --> 00:03:53,350 So the first, uh, parameter is. 49 00:03:54,330 --> 00:03:57,820 And so and also here you can see it brilliantly. 50 00:03:57,910 --> 00:04:05,090 That is the graphical user interface and dropping the ugly Windows applications. 51 00:04:05,830 --> 00:04:13,860 There'll be some main window and if you want to pop up a message box, you can pass that handle to this 52 00:04:14,400 --> 00:04:19,380 message box you're going to hand handle to the owner of window or the message box to be created. 53 00:04:19,800 --> 00:04:25,470 If this parameter is not, the message box has no owner so will be passing null for this because we 54 00:04:25,470 --> 00:04:31,740 are simply popping up the message box and we do not have any apparent graphical user interface windows. 55 00:04:33,340 --> 00:04:38,920 So first one should be null and no null means void. 56 00:04:39,580 --> 00:04:40,800 So it's not void. 57 00:04:40,840 --> 00:04:49,780 So actually white, you can pass any object type or you can pass any object type with an integer data. 58 00:04:49,780 --> 00:04:51,520 So that will be pretty resonant. 59 00:04:52,180 --> 00:04:56,560 But what we're going to do is we are going to say the pointer. 60 00:04:57,930 --> 00:04:58,830 In the winter. 61 00:05:01,110 --> 00:05:01,820 This kind of. 62 00:05:04,620 --> 00:05:11,610 So we have something this, uh, member of the structure in 2.0, which is Daniel. 63 00:05:11,700 --> 00:05:13,920 So we'll be using that in the 1.0. 64 00:05:15,200 --> 00:05:19,740 So next one is long pointer to constant white casting. 65 00:05:19,760 --> 00:05:23,180 So LP stands for the wrong pointer, c stands for constant. 66 00:05:23,180 --> 00:05:29,930 So it does not really uh, not constant means that our value does not change and. 67 00:05:31,470 --> 00:05:33,120 This is a wild card string. 68 00:05:33,120 --> 00:05:35,080 So we can be used. 69 00:05:35,100 --> 00:05:36,390 We can sit around. 70 00:05:38,690 --> 00:05:44,360 Martial as well, using these martial arts and not managed pay. 71 00:05:48,800 --> 00:05:49,240 DOT. 72 00:05:49,250 --> 00:05:57,110 So if you press unmanaged, you type dart and here you can see the rest of these manager types that 73 00:05:57,110 --> 00:05:59,300 can that can convert to. 74 00:05:59,840 --> 00:06:02,430 So here you can see a repeat of last year. 75 00:06:03,780 --> 00:06:05,970 We can also see some other stereotypes as well. 76 00:06:08,970 --> 00:06:15,120 So you can also see on unsigned integers and structures. 77 00:06:16,330 --> 00:06:17,080 And it is. 78 00:06:18,680 --> 00:06:20,120 And bold as well. 79 00:06:22,770 --> 00:06:23,820 So I'm going to be using. 80 00:06:31,340 --> 00:06:35,600 Wrong pointer to avoid getting to know what we can do. 81 00:06:35,600 --> 00:06:35,810 Either. 82 00:06:35,810 --> 00:06:39,320 You can simply screen and copy this text. 83 00:06:41,560 --> 00:06:48,670 So we are just putting these marshals and managers, they've got drunk pointer white casting before 84 00:06:48,670 --> 00:06:49,240 this string. 85 00:06:50,680 --> 00:06:53,470 So the next parameter is also the same. 86 00:06:53,470 --> 00:06:58,770 So this text will be shown on the message box and this caption is the title. 87 00:07:00,820 --> 00:07:02,680 So you can simply copy this one. 88 00:07:04,510 --> 00:07:07,780 And we can embrace a spring and we capture. 89 00:07:10,470 --> 00:07:13,200 And the last one is the tape of the message work. 90 00:07:13,200 --> 00:07:15,120 So we will be having some options. 91 00:07:15,120 --> 00:07:16,570 That is on time. 92 00:07:17,100 --> 00:07:23,210 And also here you can see if you pass this number based upon the number, the message box differs. 93 00:07:23,430 --> 00:07:26,640 So you have the okay button. 94 00:07:28,920 --> 00:07:31,590 Or get cancer, Bataan and so on, etc.. 95 00:07:32,190 --> 00:07:35,720 So the type is an insane India. 96 00:07:38,910 --> 00:07:40,290 We can say you were in the party to. 97 00:07:42,650 --> 00:07:43,250 You take? 98 00:07:47,090 --> 00:07:47,460 Okay. 99 00:07:47,480 --> 00:07:48,770 My function is ready. 100 00:07:48,800 --> 00:07:53,630 I can now just simply say my search box w off. 101 00:07:54,590 --> 00:07:57,180 So the first one is a pointer. 102 00:07:57,410 --> 00:07:59,420 Da da gyro. 103 00:08:01,010 --> 00:08:04,310 That is the now and the second one is the second. 104 00:08:04,310 --> 00:08:05,990 Next two parameters are the settings. 105 00:08:06,320 --> 00:08:08,210 I want to say hello world. 106 00:08:09,670 --> 00:08:12,660 And the next one is this year's winner. 107 00:08:13,600 --> 00:08:13,780 Are you? 108 00:08:15,010 --> 00:08:18,490 And the last one, this type of damage is what you want to display. 109 00:08:18,850 --> 00:08:22,920 I want to just simply say, okay, that is Jairo Long. 110 00:08:23,170 --> 00:08:24,930 So you can just simply said you. 111 00:08:28,180 --> 00:08:30,220 And the return type is integer. 112 00:08:31,660 --> 00:08:34,770 And here you can also see the return type information. 113 00:08:36,090 --> 00:08:38,370 You can read the message about his cancer battle. 114 00:08:38,370 --> 00:08:40,110 The function of the Tyneside cancer. 115 00:08:41,500 --> 00:08:44,920 If it is sex if the function first that it normally do you know. 116 00:08:47,530 --> 00:08:50,800 The functions are normal in the following menu item values. 117 00:08:54,510 --> 00:08:54,800 Okay. 118 00:08:54,810 --> 00:08:57,030 That's the end result. 119 00:08:59,390 --> 00:09:03,500 Now before executive we can say counsellor that read key. 120 00:09:06,890 --> 00:09:08,420 So rich people can read this one. 121 00:09:08,780 --> 00:09:12,650 And here you can see we got this message box under the screen. 122 00:09:14,510 --> 00:09:18,380 And now this is the program is waiting for the user input. 123 00:09:18,770 --> 00:09:23,360 And then if I type if I put any gear, it stops. 124 00:09:24,260 --> 00:09:29,210 So you going to press any key to continue? 125 00:09:32,030 --> 00:09:37,220 So let me, uh, build this one and change the message box type. 126 00:09:40,480 --> 00:09:43,540 It's a yes no for this. 127 00:09:43,650 --> 00:09:45,130 And here you can see there is no. 128 00:09:45,340 --> 00:09:48,760 There is this yes and no options are available. 129 00:09:52,010 --> 00:09:54,440 So this is about how you use these windows. 130 00:09:54,540 --> 00:10:01,130 We're also going to be using we're bringing out other function that is getting that user's function. 131 00:10:03,200 --> 00:10:06,290 So get net, so get username. 132 00:10:06,320 --> 00:10:15,170 So we'll be using we'll be seeing the share net, the username in the next videos and also sharing them. 133 00:10:15,590 --> 00:10:16,670 So get username. 134 00:10:16,670 --> 00:10:20,880 W So if I type, who am I? 135 00:10:21,260 --> 00:10:23,390 We will get this target as the username. 136 00:10:23,390 --> 00:10:26,210 So we'll be getting the output from this function. 137 00:10:27,070 --> 00:10:31,270 And this function is in that one area that you do not deal. 138 00:10:32,200 --> 00:10:34,570 So you can create a new project. 139 00:10:34,690 --> 00:10:36,850 Let's just include here. 140 00:10:40,480 --> 00:10:44,080 And another thing is you can also define the characters set here. 141 00:10:44,530 --> 00:10:47,290 So I can say character is equal to. 142 00:10:48,980 --> 00:10:51,020 Characters are not unique. 143 00:10:51,220 --> 00:10:54,740 So now you can see the values unique and see another. 144 00:10:55,040 --> 00:10:59,750 So if I say Unicode by default, this function will be treated as a unique. 145 00:11:00,230 --> 00:11:02,120 Now let's go ahead and do this for you. 146 00:11:02,420 --> 00:11:03,770 And also common in this one. 147 00:11:04,970 --> 00:11:09,410 And now let's go into this w over this and run this one. 148 00:11:10,280 --> 00:11:15,080 So it will, by default, will be treated as Unicode function. 149 00:11:26,290 --> 00:11:26,480 Okay. 150 00:11:26,560 --> 00:11:27,160 Coming back. 151 00:11:27,310 --> 00:11:31,930 Let's import this real and public static at ten. 152 00:11:34,940 --> 00:11:36,860 And the return tape is bullion. 153 00:11:36,980 --> 00:11:40,910 So bullion is, uh, yes or no? 154 00:11:41,090 --> 00:11:42,170 Red Bull. 155 00:11:45,150 --> 00:11:45,540 Get. 156 00:11:47,140 --> 00:11:47,980 Username. 157 00:11:51,680 --> 00:11:52,980 He was a BMW. 158 00:11:57,720 --> 00:12:01,590 So the first parameter is, uh, our parameter. 159 00:12:01,590 --> 00:12:04,050 So you're going to see the out and in. 160 00:12:04,050 --> 00:12:06,600 So output is the output parameter. 161 00:12:06,870 --> 00:12:11,880 The soda function processes something both its function and things. 162 00:12:12,270 --> 00:12:19,500 And after, uh, before exiting the function, it will write the output to this, uh. 163 00:12:20,880 --> 00:12:21,960 But amateur spaceflight. 164 00:12:22,260 --> 00:12:25,920 And here you can also see in the magic box there is this window. 165 00:12:26,070 --> 00:12:30,440 So it means we need to go to these parameters like. 166 00:12:31,730 --> 00:12:34,260 Compulsory duty crosses he option optional. 167 00:12:34,280 --> 00:12:36,800 So that means you can just leave them. 168 00:12:37,220 --> 00:12:38,630 You can only pass this one. 169 00:12:39,020 --> 00:12:46,640 So that means the last parameter would use message box type is not an optional and it's compulsory for 170 00:12:46,640 --> 00:12:48,510 this message box to display. 171 00:12:49,870 --> 00:12:53,740 And now here you can see the output parameter. 172 00:12:56,200 --> 00:12:57,220 And in and out. 173 00:12:57,220 --> 00:13:06,310 So this means so we need to pass this as a reference because it's taking the input from this one and 174 00:13:06,310 --> 00:13:07,780 also it should write to the output. 175 00:13:09,240 --> 00:13:15,770 So the first one is before normal will be using the spring for this after then. 176 00:13:17,130 --> 00:13:26,550 And the user name of this machine gets into this before the pointer to receive the buffer, you know. 177 00:13:29,800 --> 00:13:30,580 So that's. 178 00:13:33,930 --> 00:13:34,670 Sacha Baron. 179 00:13:38,010 --> 00:13:39,150 Martial arts. 180 00:13:40,550 --> 00:13:41,740 And managed to that. 181 00:13:48,200 --> 00:13:49,520 So we consider spring. 182 00:13:52,490 --> 00:13:54,410 As we, not as we. 183 00:14:01,720 --> 00:14:04,870 And the next one is the number of bites. 184 00:14:08,520 --> 00:14:11,550 These are Eric Cantor. 185 00:14:12,450 --> 00:14:17,450 And also in our report, it shows the length of the username. 186 00:14:18,300 --> 00:14:20,160 So we need to pass this as reference. 187 00:14:28,310 --> 00:14:29,360 You're in 32. 188 00:14:33,090 --> 00:14:37,110 And so we are going to use this function. 189 00:14:39,490 --> 00:14:40,960 So let me comment on this. 190 00:14:43,080 --> 00:14:47,940 Right now, what we're going to do is copy this. 191 00:14:49,780 --> 00:14:54,760 So bird result is equal to your username w off. 192 00:14:56,540 --> 00:15:04,190 So the question is whether we need to create a string builder of yes, bicycles to new spring rolls. 193 00:15:05,120 --> 00:15:12,260 So we need to create 100 of this 100 of memories. 194 00:15:12,260 --> 00:15:15,410 Best to stop so we can just sit. 195 00:15:16,920 --> 00:15:17,520 SB. 196 00:15:18,180 --> 00:15:18,720 Come on. 197 00:15:22,730 --> 00:15:29,810 And we need to create an integer to specify this number of bytes it can show. 198 00:15:29,930 --> 00:15:35,990 So we can say you in 32 sizes equals zero. 199 00:15:36,290 --> 00:15:37,970 So for now it should be zero. 200 00:15:38,600 --> 00:15:41,030 And we be passing reference size. 201 00:15:43,040 --> 00:15:50,830 So we're good to go now after getting the result, we need to speed up to speed. 202 00:15:56,060 --> 00:15:58,940 Now let's go and build the solution. 203 00:15:59,450 --> 00:16:00,770 I hope everything is fine. 204 00:16:01,100 --> 00:16:01,970 So let's run this. 205 00:16:03,030 --> 00:16:04,440 So we did not get any output. 206 00:16:08,390 --> 00:16:10,760 So let's see where we did this wrong. 207 00:16:11,120 --> 00:16:15,070 A pointer to the buffer to receive the user's roundup. 208 00:16:23,980 --> 00:16:28,150 I think we are converting converting this as wrong. 209 00:16:42,320 --> 00:16:43,400 Let's bring. 210 00:17:45,380 --> 00:17:45,820 Okay. 211 00:17:46,040 --> 00:17:46,670 My word. 212 00:17:46,910 --> 00:17:49,040 What we're going to do is, uh. 213 00:17:49,430 --> 00:17:49,940 Sorry. 214 00:17:50,480 --> 00:17:50,900 I need to. 215 00:17:51,150 --> 00:17:54,050 I do not sprayed years as a candidate. 216 00:17:54,410 --> 00:17:56,300 That's why it is giving there. 217 00:17:56,820 --> 00:17:57,530 Sorry, Father. 218 00:17:59,720 --> 00:17:59,860 Now. 219 00:17:59,930 --> 00:18:01,280 Let's go and run this one. 220 00:18:02,950 --> 00:18:12,130 And now you can see the output so side for this I thought I thought it was only our parameter. 221 00:18:12,130 --> 00:18:12,700 I did not. 222 00:18:12,720 --> 00:18:13,120 Uh. 223 00:18:13,390 --> 00:18:14,500 I forgot this in. 224 00:18:20,280 --> 00:18:24,300 So here you can see you don't need to worry about the. 225 00:18:26,710 --> 00:18:30,640 This spring here because we are passing this time builder. 226 00:18:31,360 --> 00:18:32,740 Builder is a mutable type. 227 00:18:33,370 --> 00:18:35,260 Why the spring is immutable. 228 00:18:35,710 --> 00:18:47,440 So it is better to use spring buffer spring builder for these parameters and for the parameters we can 229 00:18:47,440 --> 00:18:49,450 normally use on normal springs. 230 00:18:51,760 --> 00:18:53,920 So that's what it's really all about. 231 00:18:53,920 --> 00:18:57,550 Covering the basics of how to use Windows app using the sheesha.