[水]用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,有些秘籍不太适合公开,公开了就不值 ...
随机推荐
- SSD硬盘 全盘安全擦除
此文From http://ssd.zol.com.cn/575/5753057.html 在SSD固态硬盘的使用过程中,部分用户可能会碰到计算机意外掉电或死机并强行断电后,系统出现异常,扫描SSD后 ...
- Notes on how to use Webots, especially how to make a robot fly in the air
How to create a new project Wizard - New project directory Scene Tree Scene tree is a representati ...
- Oracle 数据同步系列--触发器
现在随着项目集成的越来越深入,异构的数据多起来,数据同步的场景也用的多起来,我甚至在考虑是否忽悠用户上Oracle GoldenGate了,这样就可以不用考虑采用哪种同步方案了. 简单的介绍一下我们数 ...
- 旧文—冬日感怀
冬日感怀 下雪了,虽不大,可那雪花落在手上,融在心里,便泛起淡淡的温柔,因为这是冬日的馈赠啊,是上苍的礼物,是往昔记忆的灰烬化作天地间的精灵装点纷繁琐碎的世界.于是,透过汽车上雾气氤氲的玻璃窗,人 ...
- Raft论文的一些问题
抛些问题出来,真正解释了这些问题才算理解了论文.:) 1. 什么是复制状态机 2. Raft vs Paxos 3. Raft的设计目标understandability,为达到设计目标在做设计时如何 ...
- python string.py 源码分析 三:maketrans
l = map(chr, xrange(256)) #将ascii转为字符串 _idmap = str('').join(l) del l # Construct a translation stri ...
- U3D中IOS平台泛型方法尽少使用
U3D的IOS最小运行库use micro mscorlib是不包含泛型反射方法的,如FieldType.GetGenericArguments方法.所以尽量少用List而直接使用array. 另外请 ...
- android SDK Manager 上载失败
android SDK Manager 下载失败如题,利用android SDK Manager 无法下载各个版本的SDK,是最近无法连接上谷歌的服务器吗?我用了网上说的在C:\WINDOWS\sys ...
- DMSFrame 之SqlCacheDependency(二)
上篇文章介绍的是通知模式的缓存机制,这里介绍的是数据库轮循模式处理,这种模式对SQL2005以下的支持还是比较好的 引擎源码如下: /// <summary> /// 轮循模式 /// 数 ...
- winform用户控件
用途用户控件包含Time控件和一个lable控件,一个ToolStrip控件,每隔一秒显示一次时间 1. 生成用户控件 新建一个项目类型为用户控件 注意定义类名,此类名为以后工具箱中显 ...