[水]用vb写了个PCB
这学期我们学操作系统,所以得写个PCB。
于是我借鉴了一下windows的PCB,写了这个
Imports System.Runtime.InteropServices
''' <summary>
''' 这就是传说中的PCB
''' </summary>
Structure KPROCESS
Dim Header As DispatcherHeader
Dim ProfileListHead As LinkedList(Of ProcessProfileSimulator)
Dim DirectoryTableBase As UInteger
Dim LdtDescriptor As KernelGlobalDescriptorTableEntry
Dim Int21Descriptor As KernelInterruptDescriptorTableEntry
Dim IopmOffset As Short
Dim Iopl As Byte
Dim ActiveProcessors As UInteger
Dim KernelTime As UInteger
Dim UserTime As UInteger
Dim ReadyListHead As LinkedList(Of ProcessSimulator)
Dim SwapListEntry As SingleLinkedList(Of ProcessSimulator)
Dim VdmTrapcHandler As IntPtr
Dim ThreadListHead As LinkedList(Of ThreadSimulator)
Dim ProcessLock As UInteger
Dim Affinity As UInteger
Dim ProcessFlags As ProcessFlag
Dim BasePriority As SByte
Dim QuantumReset As SByte
Dim State As Byte
Dim ThreadSeed As Byte
Dim PowerState As Byte
Dim IdealNode As Byte
Dim Visited As Byte
Dim ExecuteOptions As Byte
Dim StackCount As UInteger
Dim ProcessListEntry As LinkedList(Of ProcessSimulator)
Dim CycleTime As ULong
End Structure Enum ProcessFlag
None
AutoAlignment
DisableBoost
DisableQuantum =
End Enum Structure DispatcherHeader
Dim UnionType As Byte
Dim UnionData As UnionA
<StructLayout(LayoutKind.Explicit)>
Structure UnionA
<FieldOffset(0)> Dim Abandoned As Byte
<FieldOffset()> Dim Absolute As Byte
<FieldOffset()> Dim NpxIrql As Byte
<FieldOffset()> Dim Signalling As Byte
<FieldOffset()> Dim Size As Byte
<FieldOffset()> Dim Hand As Byte
<FieldOffset()> Dim Inserted As Byte
<FieldOffset()> Dim DebugActive As Byte
<FieldOffset()> Dim DpcActive As Byte
End Structure
Dim Lock As Integer
Dim SignalState As Integer
Dim WaitListHead As LinkedList(Of ProcessSimulator)
End Structure Structure KernelGlobalDescriptorTableEntry
Dim LimitLow As Short
Dim BaseLow As Short
Dim HighWord As UInteger
End Structure Structure KernelInterruptDescriptorTableEntry
Dim Offset As Short
Dim Selector As Short
Dim Access As Short
Dim ExtendedOffset As Short
End Structure Enum KernelExecuteOptions As Byte
None
ExecuteDisable
ExecuteEnable
DisableThunkEmulation =
Permanent =
ExecuteDispatchEnable =
ImageDispatchEnable =
End Enum
那个SingleLinkedList是我自定义的
Public Class SingleLinkedList(Of T)
Public Property [Next] As SingleLinkedList(Of T)
Public Property Value As T
End Class
[水]用vb写了个PCB的更多相关文章
- abap调vb写的dll实现电子天平的读数(带控件版)
废话不多说,直接上. 鉴于abap调研的dll文件需要在wins注册,自己尝试过delphi和C#感觉不是很好,最后毅然选择了VB来写 因为需要用到MScomm控件,所以对于将要写的dll需要带for ...
- 运行vb写的程序,有些电脑上会弹出一个与office相关的窗口
到网上搜索了一下,找了几个解决方案,不过我的电脑上没出现过,所以先收藏一下,或许以后能用上. 来自:http://bbs.csdn.net/topics/380204412 今天将注册表的项一个个删除 ...
- VC调用VB写的COM
VB. 步骤: 1.创建类库:类库的创建必须分为接口和实现类:给外面提供的是COM接口: 创建了接口和类之后还要创建"Guid",这个在"工具->创建GUID&qu ...
- vb写文件时报'Invalid procedure call or argument'
原来的一段代码是这样的: Set fso3 = CreateObject("Scripting.FileSystemObject") 'msgbo ...
- VB 共享软件防破解设计技术初探(二)
VB 共享软件防破解设计技术初探(二) ×××××××××××××××××××××××××××××××××××××××××××××× 其他文章快速链接: VB 共享软件防破解设计技术初探(一)http ...
- 用VB实现SmartQQ机器人
这里为了便于介绍程序设计的流程,更多以代码形式给出,具体可用火狐浏览器的firebug插件来抓包分析,或者用谷歌浏览器的开发者工具进行抓包.抓包地址是:http://w.qq.com 第一步,是二维码 ...
- 演练:使用Xamarin.Forms开发产品介绍性质的应用(VB版)
概述 Xamarin这个使用mono和.net core的跨平台开发框架这几年在不断发展.被微软收购后的Xamarin为个人开发者提供了免费版的Xamarin for Visual Studio,吸引 ...
- 在uwp中复活常用的vb库函数
这个博文是纯原创的,转载一定要说明作者是 Nukepayload2!! 在.Net Core 中,很多地方被精简了,有个重灾区就是vb语言库.从当初的囊括vb6库函数并且附带后期绑定到现在的几个函数加 ...
- [Aaronyang] 写给自己的WPF4.5 失传的第一本古老秘籍[多扩展显示器编程]
世界上只有想不通的人,没有走不通的路 --Aaronyang的博客(www.ayjs.net)-www.8mi.me =============时隔两年后再看WPF,有些秘籍不太适合公开,公开了就不值 ...
随机推荐
- End of HTML blink tag
Recently I have read a news which said "Firfox 23 nixes support for outdated blink HTML tag&quo ...
- SQLServer2008新建链接服务器for Oracle
SQLServer2008新建链接服务器for Oracle 最近要在SQLServer2008中使用Oracle 10g的一个视图,通过建立链接服务器即可在SQLServer中使用Oracle提 ...
- FindBugs工具常见问题
1,AM: Creates an empty jar file entry (AM_CREATES_EMPTY_JAR_FILE_ENTRY)/AM: Creates an empty zip fil ...
- 命令行模式下 MYSQL导入导出.sql文件的方法
一.MYSQL的命令行模式的设置:桌面->我的电脑->属性->环境变量->新建->PATH=“:path\mysql\bin;”其中path为MYSQL的安装路径.二.简 ...
- 【cocos2d-x 手游研发----目录】
感谢大家一直支持我写这样一系列的博客,从中我自己也获益良多,cocos2d-x这样一款非常棒的引擎,是值得我们去学习和分享的,谈到分享,那我就把这套写了差不多一两个月的框架给大家开源下载,写的很一般, ...
- 数据库时间createtime字段 数据类型的选取
之前是一直在用datetime类型(db)精度到yyyy-MM-dd HH:mm:ss 或者 date类型 精度到 yyyy-MM-dd 用了框架自动注入功能,自己也没去深入没去管他的set赋值值等等 ...
- Linux 学习碎片
1.登录远程机器: ssh 远程机器用户名@远程机器IP ssh root@192.168.1.101 2.不同机器之前拷贝文件 #拷贝本机单个文件到远程服务器 scp /home/user1/tb. ...
- Razor 在WebApp 框架的运用
前面有两章介绍了WebApp框架<WebApp MVC,“不一样”的轻量级互联网应用程序开发框架>和<WebApp MVC 框架的开发细节归纳>,其中视图引擎是用的Nveloc ...
- [LeetCode] 桶排序的特殊解,例 Sort Color
Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of t ...
- (转)Netfilter分析
看到一篇讲Netfilter框架的,如果有一点基础了的话对于捋清整个框架很好帮助,转下来细细阅读. 转自http://aichundi.blog.163.com/blog/static/7013846 ...