Tuesday, October 26, 2010

C + + / CLI speculative registered agent constructor


Now we discuss the new C + + / CLI environment, a cool feature, called the proxy constructor.

A class, there are multiple constructors often do; and that this constructor has a number of common code is also very often. In general, in this case, we are prepared for the common code a separate function, and then placed in each constructor call. Following example: class Foo
(
private:
int _mem;
public:
Foo (): _mem (0)
(
CommonConstructor ();
)
Foo (int mem): _mem (mem)
(
CommonConstructor ();
)
Foo (const Foo & f): _mem (f._mem)
(
CommonConstructor ();
)
/ / We need all the constructor's code
void CommonConstructor ()
(
printf ("Constructing the object");
)
);






Recommended links:



Ma: If you shut off Taobao fakes to be Off tonight



InuYasha process Raiders



UML: the perfect combination with the Zachman



Comments Trace And Ping Tools



DVR-MS to MP4



AMD Expects Q4 revenue to fall about 25%



Compilation of various source - inthand



choosing a quality Replacemment car battery



Using PHOTOSHOP build a passion Miyi chocolate effect



For You Science - Screen Savers



"Aion" 1.2 There are a brush obs of the bug is still alive



VOB To MPG



How to improve the AGENCY'S initiative



Cattle were made with Maya The whole process of real eye



FLV To PSP



Friday, October 15, 2010

Photoshop mouse painted illustration major combat (3): Draw Butterfly


Section III: Butterfly Drawing
63, to open a file for the new butterfly wings it. Pen sketch of a butterfly wings (if not allowed to grasp, it is recommended to use reference chart), as shown.



64, converted into constituencies, padding is black, then the new layer, outline the scope of butterfly wings internal color, first fill of white. Since then a new layer in preparation for painting the wings of the skeleton.



65, a skeleton with a pen to sketch out some of what? Pen to outline the line does not automatically end? Under the second point and press ESC, the line will end this paragraph. Figure distribution.



66, those skeleton only path, the path. To become a line. Select brush tool, select an ordinary brush, the size of 2px.



67, the path panel, select the path with the current brush painted. Can see that skeleton out.



68, select the upper part of the original is white, used yellow gradient.



69, the same treatment the rest of the initial Shanghao wing color.



70, the skeleton copy layer.



71, will copy the good white skeleton RP changes, as shown.



72, to the Gaussian blur ~ can see the light of the transition effects.



73, more layers can be replicated to enhance the effect.



74, the framework that combined several layers of white, mixed-mode stack to adjust, and then make a black frame is not hidden, the effect is as follows.



75, began painting the white spots on their wings.



76, see the distribution of spots.

77, filling a good white effects shown.



78, and the background to hide, merge copy the entire wing.

79, pulls the main background. Course to transform the.



80, the initial transformation, and then copy the multi-layer, forming a pair.



81, the front wings with masks, then brush (remember the lower the opacity of the brush) brush with a few, faintly translucent wings arises.



82, with a pen to outline the butterfly body, check the back of the stomach, adjust the color to distinguish between the chest and abdominal (insects in three parts: head, thorax, abdomen).






[Next]



83, the top elected body by the smooth, extremely important to remember the emergence action!



84, HSB go again ... ... I remember the same time increase the brightness to increase saturation, so the color will not gray, but appear bright, colorful.



86, with a pen to outline the stomach of the stripes, and then into constituencies and emergence, and then adjust the hue, good effect, and Figure.



87, Butterfly add a shadow below to see results.



88, the head drawn with a round black piece, now painted with a pen shape antenna.



89, fill in more than a black copy, see the effect.



90, the same drawing feet. With six in the chest (right? Entomologists do not hit me, huh, huh)



91, again the effect. Shadow abrupt point.

92, according to the direction of light, the shadow of the thumb piece of that piece should not be like projection. Amplified the changes!

93, adjust the thumb of color, will reduce shadows.



94, complete the drawing! Now we have to do post-processing: the effect of creating depth of field.

Select the entire canvas, press CTRL + SHIFT + C to copy the entire screen merge.



95, the same size to create a new document, paste, and copy the new layer, then layer the larger the new Gaussian Blur, then hides.



96, then the bottom of the screen and then copy the new layer on top of the screen placed in the clear.



97, on which a small degree of Gaussian blur, plus mask.



98, on the black and white radial gradient mask, butterfly center, look, the initial depth of field simulation results have emerged, butterfly is clear, while other parts of the vaguer and vaguer.



Click on the picture to enlarge

99, the same deal with the largest layer fuzzy head. However, to increase the radius of the gradient.



100, to see two fuzzy Mask What is the difference between it. This operation is similar steps to simulate the lens focal point, clearly, other features blurred, in general, blurring will produce different changes with distance. This two-story, on the simulation of this effect. Of course, if you really want to study, close to the truth is not possible ... ...



101, and finally add the title to complete the effect!



Click thumbnail for larger view

Tutorial Electric.






Recommended links:



FLASH MX Overview 3



The Fate Of Sina And Sohu, Sina Too Poor To Only Ads



OGM to AVI



JSP2.0 simple symbol library extension _SimpleTag



Fraud WARNING: Fishing the latest plot and potential threats



Storage Inventory And Barcoding



Zhejiang winter surgery: bargain-hunting opportunities to



Comparison Registry Tools



Understanding of the process of DB2 Universal Database (2)



Flash the perfect lover



Stay Cool On The Go With A Portable Fridge



Hot DESKTOP



QuickTime to MPG



Blizzard: "StarCraft 2" continues to stand by the end of 2009 for sale



MPG to AVI



Sunday, October 10, 2010

Listen to the voices of employees



Victor Ng, general manager of the new GlaxoSmithKline U.S. manufacturers in the fast moving consumer goods company Unilever for 22 years, the "quit" into a more competitive pharmaceutical industry. New to the post, first grasp what? Victor Ng's experience is: life's work. "Although Chinese medicine is a career 20 years I have never been in contact area, but general manager's task is much the same position. Business is a team of general manager to do is set the whole team the advantage of a comprehensive initiative to mobilize the staff . "

People to do the work, we must first listen to the voices of employees. GlaxoSmithKline company has 800 U.S. employees, has to do medicine in China for 20 years of experience. So this year, just one post, Victor Ng will be arranged with staff, the idea of listening to employees. He told reporters: "I first of all employees of that corporate culture is to change or maintain the status quo. As the new general manager, I think I used to service should not be brought in the company's culture. Culture should reflect the culture of employees, rather than the general manager of the cultural, GlaxoSmithKline 800 employees of Sino-US common needs of culture. "

Through brainstorming, Victor Ng clarified the mandate of the new jobs this year: Our goal is in the next 3 to 4 years to become the industry's most respected companies, job seekers have not only become the first choice, but also employees of the "Music Industry" where .

"Employees are the greatest asset, different levels of staff development and training needs, they will notice that we have not provided more room for them to see our training rich enough, not good enough. Therefore, we This year will focus on different levels and different positions for the staff, introduction of more training programs than ever before, significantly different levels of training to improve. "Victor Ng said.

Victor Ng believes that staff training can not only enhance the team training staff awareness, improve performance, but also a good way to strengthen the corporate culture. He told reporters, through extensive staff training, and promoted the building of enterprise culture, this is the company has been promoting mutual trust, open and transparent and independent spontaneous spirit. "Mutual trust is very important is the hundreds of teams, different departments, hundreds of people work together, many things need to trust each other to complete the well. The company needs mutual trust between the different staff, different departments and more need for mutual trust. "Victor Ng said.

For open and transparent and independent development, Victor Ng explained that: "We opened ourselves up to our problems, there are problems we have to say, it should be released out of respect to each other. Different levels of employees can put forward their own views, for the company business initiative to do things, not so driven by their superiors. a corporate culture can not be static, but no matter how they change, the cultural workers who must be approved by corporate culture. "

Turning to human resources in building some of the measures, Victor Ng said that the current Sino-US GSK has established a good assessment of plans and incentive compensation benefit plans, employees make a very good career development opportunities, working hard at the same time be reasonable return. In personnel training, the U.S. GlaxoSmithKline will implement employee performance management system to help employees develop and improve themselves. According to this system, employees and management personnel directly communicate with each other and jointly develop key objectives and implementation strategies and methods, while the employee self-made career development plans and objectives of the establishment phase in training to help employees to achieve self-management, self-development.










Recommended links:



Hpqimzone Exe Not Responding Clean Up These



QuickTime to MPG



The New VPN Strength



Best Games Simulation



Listed company s three key financial indicators



OGM To AVI



Picked Accounting And Finance



Pressure direct sales model, "Yang Shuai" Miller came to Power Dell



Best Religion



When the doctor came to THEIR computers for health



MPG To AVI



Vigilance "Fantasy Westward Journey" Daohao Trojan havoc



Mold industry began to show radiation Effects



Overall bandwidth of Thunder Edge Broadcasting below to see new resolution



Open-source Framework For Thinking About [3]



Tuesday, September 28, 2010

Credit "to bear the blame," Who back?


Some time ago, I saw major domestic media have reported that the central bank put into use personal credit information database, but in most media reports have described has a plot, Mr. Wang is a place for non-payment of Guangdong Development Bank Credit card annual fee was added in the personal credit database, a bad record, no knowledge of his purchase of agricultural bank loan was rejected.

Similarly, because a friend recently I apply for CITIC Industrial Bank's credit card was refused, and also because of his bad credit record. Through memories, Then he remembered who was in the Guangdong Development Bank to help friends who work for the completion of issuing process over a broad mandate issued credit card, apply for credit cards, said the first year annual fee waiver for the second year, if not paid do not want to continue to use annual fee you can. However, after more than a year without receiving any calls, text messaging, e-mail notice shall pay an annual fee of the case, the Guangdong Development Bank will be directly sent a reminder of the lawyer's letter, This the second year that do not pay annual fee does not work, and has been the payment date ... ... although very happy things finally settled, it is clear that, by banks to add in the personal credit history in a bad record into the aftermath of the incident.

In accordance with the central bank's statement, the national network of individual credit database, whether the future can even pay their individual water, electricity and gas charges are included in the scope of credit history, credit history and personal financial activities will play an increasingly important role. The central bank's super-scale CRM system, number of people covered, the breadth of applications is beyond doubt. However, I work in the financial system through a friend understand that the personal credit database of features is not perfect, and now can not distinguish between malicious and good debt arrears. That is, for a person with intent to defraud, one because of his bad memory and forget to pay a fee and a bank staff as a result of negligence or dereliction of duty in arrears without the knowledge of who they personally credit history credit database may even be the same. If the individual credit database, can only record a delinquent act and no delinquent behavior, can not record the reasons for arrears and assessment is malicious or non-malicious, then functions of this CRM system is also equivalent to a simple notebook, Moreover, some bank staff may not fulfill this obligation in accordance with the workflow (for example, the amount of notification bill, charge date, mortgage or car loan interest rate increases as a result of whether the monthly payment adjustments), then the person probably just made a scapegoat The copies of the.

The author believes that individual credit database, the mind should be put into use in the financial activities of the individual's actual behavior to determine a person's credit rating. However, due to the imperfections of the system, coupled with still no one able to bank credit, service records, assessment, and standardized system of bank staff working attitude, methods can determine your credit rating, and also we can do is frequently used as soon as the card is not all the write-off in the future no more free to work in a bank to help students and friends to complete the task card, after all, more than one card, the more a pair of hands affect your credit record.






Recommended links:



MKV to VOB



Backup And Restore Directory



"Border Land" Skill Tree Rules Of Operation And Processing Point



Domain name will be the first time Chinese and other non-Latin alphabet and opening support 11 LANGU



suzhou school of music pos systems pos touch tea



American professional experts: seven double the efficiency and salary Tips



Carried out in the end to P2P: the story ABOUT the Jxta (2)



3GP to MPEG



Unihub To Come from behind



Hong Kong PCCW Privatization Commission will vote by sealed-depth inquiry



How to draw background IMAGE CAknGrid



2005 Fun WORKPLACE



Hot Dial Up And Connection Tools



AVI To IPod



Friday, September 17, 2010

Actual serial communication


Program did not write the article for a long time, and recently to compile a serial communication terminal program busy for nearly a month, was found in the Win32 API has a lot of communication problems, and many other serial communications in the article did not Turning to the issue, talk about where to concentrate. This is not a comprehensive how to write a serial communication program, but rather to discuss some practical problems.

1 Select the means of communication - synchronous or asynchronous

As in the "Serial communications in Microsoft Win32" and other articles mentioned, synchronization (NonOverLapped) approach is a relatively simple way to write code to be significantly less than the length of the asynchronous (OverLapped) way, I began to write synchronization the whole routine, to work in normal Windows98, Windows2000, but later tested and found to receive normal, but the one to send data, the program will stop there, because synchronization mode should be is if there is a communication Api in operation, another One will block until the completion of an operation, so when reading the data when the thread stay in WaitCommEvent, WriteFile stopped there. I tested my hands all the examples of serial communication program, found that all the procedures for using the synchronization mode Windows 2000 does not work correctly under all of this I could not find a solution, was found on the site in Iczelion article referred to under NT and 9x serial communication processing is different, simply do not expect to under NT or Windows 2000 while using synchronous mode send and receive data and I have to use asynchronous mode to the communication routines to re-write it again.

Therefore, the recommendations on this issue is: If the program is only intended to work in Win9x, the sake of simplicity, you can write programs using synchronous mode, if the program intends to work in the NT, you can then use the asynchronous mode must be written.

2 Win32 Communications API Bug one --- CommConfigDialog

CommConfigDialog is built into the system serial port settings dialog box pops up the API, we are set in the Device Manager dialog box is the serial port parameters, use the API without first opening the port, it is not for an already open port, but only the contents of the DCB is completed to the dialog box, press the OK when the results after the deposit back to the input DCB data structure, as when set to the serial port on the results, that is, you had to do.

CommCinfigDialog defined as follows:

BOOL CommConfigDialog (

LPTSTR lpszName, / / pointer to device name string
HWND hWnd, / / handle to window
LPCOMMCONFIG lpCC / / pointer to comm. Configuration structure
);

However, the use of found, the dialog box can sometimes, sometimes not get out, the final summing up the experience of the problem structure in COMMCONFIG dwSize field, COMMCONFIG defined as follows:

typedef struct _COMM_CONFIG (
DWORD dwSize;
WORD wVersion;
WORD wReserved;
DCB dcb;
DWORD dwProviderSubType;
DWORD dwProviderOffset;
DWORD dwProviderSize;
WCHAR wcProviderData [1];
) COMMCONFIG, * LPCOMMCONFIG;

In the parameters, wVersion to fill 100h, dwProviderSubType to fill one, but can not fill sizeof COMMCONFIG dwSize, I found that if a certain ratio should be set dwSize to sizeof COMMCONFIG dialog box out, so I used the code defines a large enough buffer for the address structure:

_CommConfigDialog Proc
local @ stCC [256]: BYTE

pushad
invoke RtlZeroMemory, addr @ stCC, sizeof @ stCC
mov (COMMCONFIG ptr @ stCC). dwSize, 256
mov (COMMCONFIG ptr @ stCC). wVersion, 100h
mov (COMMCONFIG ptr @ stCC). dwProviderSubType, 1
invoke CommConfigDialog, addr [esi]. szPortName, [esi]. hWnd, addr @ stCC
popad
ret

_CommConfigDialog Endp

3 Win32 Communications API Bug bis --- BuildCommDCB

BuildCommDCB function is to a string such as com1: 9600, n, 8,1 such a conversion to the specific data to fill in DCB, but in use there, I found that I use it to transform like com1: 9600, e, 7,1 with a parity bit like a string, it does not always give me this e conversion in the past, set up the serial port of a look into 9600, n, 7,1, and return the above-mentioned CommConfigDialog The results used to set the serial port is correct, by comparison, found that the problem lies in DCB.fbits.fParity this bit, only this bit set to 1, parity bit is valid, but BuildCommDCB precisely missed this bit, If you want to use all BuildCommDCB, do not forget to add the DCB.fbits.fParity settings back, I used the code is:

_BuildCommDCB Proc _lpszPara, _lpstDCB

pushad
mov esi, _lpstDCB
assume esi: ptr DCB

invoke RtlZeroMemory, esi, sizeof DCB
invoke BuildCommDCB, _lpszPara, esi
;************************************************* *******************
; Under the parity bit added to set DCB in DCB.fbits.fParity field
;************************************************* *******************
mov dword ptr [esi]. fbits, 0010b

cld
@ @:
lodsb
or al, al
jz @ F
cmp al ,''=''
jz _BCD_Check
cmp al ,'',''
jnz @ B
_BCD_Check:
lodsb
or al, al
jz @ F
or al, 20h
cmp al,''n''
jnz @ B
;************************************************* *******************
; Scan = n or, n parity bit is canceled
;************************************************* *******************
mov esi, _lpstDCB
and dword ptr [esi]. fbits, not 0010b
@ @:
popad
ret

_BuildCommDCB Endp

4 Win32 programming in general process of communication

Because the synchronization method is relatively simple, here is about the way the process of induction, many of the other article mentioned Windows communication API has more than 20, they are:

BuildCommDCB
BuildCommDCBAndTimeouts
ClearCommBreak
ClearCommError
CommConfigDialog
EscapeCommFunction
GetCommConfig
GetCommMask
GetCommModemStatus
GetCommProperties
GetCommState
GetCommTimeouts
GetDefaultCommConfig
PurgeComm
SetCommBreak
SetCommConfig
SetCommMask
SetCommState
SetCommTimeouts
SetDefaultCommConfig
SetupComm
TransmitCommChar
WaitCommEvent

I just see the API, when do not know how to use them, but not all of these API are to be used, for example, you want to detect the current serial port settings can only SetCommState without GetCommProperties and GetCommConfig, although they return to The information may be more. Similarly, if you want to use some default values, such as buffer size and timeout time, etc., then SetupComm and BuildCommDCBAndTimeouts, SetCommTimeouts can not, TransmitCommChar is immediately sent into the priority sequence used to send a character, usually rarely used, the following must be used about the API and use these steps:

Establishment of Event - with CreateEvent

invoke CreateEvent, NULL, TRUE, FALSE, NULL
Asynchronous serial mode operation OVERLAPPED structure must be defined, which hEvent must establish their own, you have to define two OVERLAPPED structure, one for reading one for writing, of course, must also create two Event, put them in OVERLAPPED.hEvent


Open the serial port - use CreateFile

invoke CreateFile, addr szPortName, GENERIC_READ or GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL
Note that with asynchronous mode must be specified FILE_FLAG_OVERLAPPED, and papers must be OPEN_EXISTING, read and write must be GENERIC_READ or GENERIC_WRITE


Set serial port parameters - with SetCommState

invoke SetCommState, hCom, addr dcbx
hCom is in front of the handle to open a successful return, dcbx is the data structure DCB, which includes the specific parameters of communication, as the establishment of this parameter, you can fill out their own, you can also use the previously mentioned BuildCommDCB or CommConfigDialog fill


The establishment of the thread reading data

Here, you can start reading data, and generally we are in the main thread to write data, because writing is something we can control, and reading the data when we do not know when it will come, so I want to set up a new thread Yonglai Reading data, in this thread, we cycle to read serial port using ReadFile, while the state line with WaitCommEvent detection.


To test communication status, as CTS signals, RingIn and so on - with SetCommMask, WaitCommEvent, ClearCommError, GetCommModemStatus

invoke SetCommMask, hCom, EV_BREAK or EV_CTS or EV_DSR or EV_ERR or EV_RING or EV_RLSD or EV_RXCHAR or EV_RXFLAG or EV_TXEMPTY
SetCommMask designated WaitCommEvent to wait for the event name, please check the manual for the specific parameters

invoke WaitCommEvent, hCom, addr dwEvent, NULL
WaitCommEvent wait until one of the specified event occurs SetCommMask

invoke ClearCommError, hCom, addr dwError, addr stComStat
In WaitCommEvent later, use the clear events ClearCommError Flag, for the next round of WaitCommEvent, while the API can get more detailed event information

invoke GetCommModemStatus, hCom, addr dwModemStatus
Similarly, GetCommModemStatus is used to obtain serial line status, such as CTS, RING, etc., when WaitCommEvent return, only that the state has changed, such as CTS, etc., but specifically into the On or Off to also depend on the API obtain more detailed information


Reading data - use ReadFile

invoke ReadFile, hCom, addr szBuffer, sizeof szBuffer, addr dwBytesRead, addr stReadState
The last parameter is defined at the beginning of the OVERLAPPED structure's address, designated it the way that is asynchronous read mode, the API will return immediately, and the latter use

invoke GetOverlappedResult, hCom, addr stReadState, addr dwBytesRead, FALSE
Read the rest of the data


Close the port at the end - stop waiting and close ports WaitCommEvent CloseHandle

Normal procedures will remain in WaitCommEvent wait, when to terminate the thread when the process must withdraw from the WaitCommEvent in, this time to use

In accordance with the instructions on the Win32 manual, parameters NULL's SetCommMask make another thread in the WaitCommEvent immediately returned, and then the port is closed with CloseHandle
invoke CloseHandle, hCom
5 Win32 Communications API Bug bis --- SetCommMask and WaitCommEvent

Strictly speaking it should not be a Bug, but by accident, I found that sometimes I can not read the thread end, tracking found to be parked in the WaitCommEvent, this description sometimes invoke SetCommMask, hCom, NULL does not make WaitCommEvent exit I last used by: the SetCommMask a later invoke SetEvent, stReadState.hEvent, to read the OVERLAPPED structure Event Set for WaitCommEvent think that Event occurs, it will immediately return, perhaps this is not universal , but if your program is stopped at the WaitCommEvent place a try.

6 How to read the thread in the cycle of preparation

In accordance with the "Serial communications in Microsoft Win32" article in the routine, time cycle can be:

# Define READ_TIMEOUT 500 / / milliseconds

DWORD dwRes;
DWORD dwRead;
BOOL fWaitingOnRead = FALSE;
OVERLAPPED osReader = (0);

/ / Create the overlapped event. Must be closed before exiting
/ / To avoid a handle leak.
osReader.hEvent = CreateEvent (NULL, TRUE, FALSE, NULL);

if (osReader.hEvent == NULL)
/ / Error creating overlapped event; abort.

if (! fWaitingOnRead) (
/ / Issue read operation.
if (! ReadFile (hComm, lpBuf, READ_BUF_SIZE, & dwRead, & osReader)) (
if (GetLastError ()! = ERROR_IO_PENDING) / / read not delayed?
/ / Error in communications; report it.
else
fWaitingOnRead = TRUE;
)
else (
/ / Read completed immediately
HandleASuccessfulRead (lpBuf, dwRead);
)
)


if (fWaitingOnRead) (
dwRes = WaitForSingleObject (osReader.hEvent, READ_TIMEOUT);
switch (dwRes)
(
/ / Read completed.
case WAIT_OBJECT_0:
if (! GetOverlappedResult (hComm, & osReader, & dwRead, FALSE))
/ / Error in communications; report it.
else
/ / Read completed successfully.
HandleASuccessfulRead (lpBuf, dwRead);

/ / Reset flag so that another opertion can be issued.
fWaitingOnRead = FALSE;
break;

case WAIT_TIMEOUT:
/ / Operation isn''t complete yet. FWaitingOnRead flag isn''t
/ / Changed since I''ll loop back around, and I don''t want
/ / To issue another read until the first one finishes.
/ /
/ / This is a good time to do some background work.
break;

default:
/ / Error in the WaitForSingleObject; abort.
/ / This indicates a problem with the OVERLAPPED structure''s
/ / Event handle.
break;
)
)


This is a procedure in 98 normal, but very unfortunate that under the Win2000, ReadFile always returns the correct time, not to return ERROR_IO_PENDING, make the following WaitForSingleObject cycle non-existent, The problem is, ReadFile returns the correct time is read every time 1 byte, the result program works very strange, even if many of the characters in the buffer, the program also can only read one character each time, to wait until the send operation character or do other changes to the state line to read the next character , I do not know this strange phenomenon is how it happened, anyway I solved the way is ReadFile Qian Zai add WaitCommEvent, Zhen Zheng Yi Hou Cai until EV_RXCHAR go ReadFile, Dao Finally, I Yong's Xunhuan is that, without an article in Suiran example is the case, but it also in windows9x and work well under windows2000:

. While dwFlag & IF_CONNECT
;************************************************* *******************
; Detection of other communication events
; If detected and defined lpProcessEvent call the lpProcessEvent
;************************************************* *******************
invoke WaitCommEvent, hCom, addr @ dwEvent, NULL; addr stReadState
push eax
invoke ClearCommError, hCom, addr @ dwError, addr @ stComStat
pop eax
. If eax == 0
invoke GetLastError
. If eax == ERROR_IO_PENDING
or dwFlag, IF_WAITING
. Endif
. Else
; Here is the line handling state
. Endif
;************************************************* *******************
; If you do not have to wait for asynchronous read process, the read port
;************************************************* *******************
. If! (DwFlag & IF_WAITING)
mov @ dwBytesRead, 0
invoke ReadFile, hCom, addr @ szBuffer, sizeof @ szBuffer, addr @ dwBytesRead, addr stReadState
. If eax == FALSE
or dwFlag, IF_WAITING
invoke GetLastError
. If eax! = ERROR_IO_PENDING
; Here is the error handling
. Endif
. Else
and dwFlag, not IF_WAITING
mov eax, @ dwBytesRead
. If eax! = 0
; Here is the received data processing
. Endif
. Endif
. Endif
;************************************************* *******************
; If the asynchronous read port, then wait
;************************************************* *******************
. If dwFlag & IF_WAITING
invoke WaitForSingleObject, stReadState.hEvent, 200
. If eax == WAIT_OBJECT_0
and dwFlag, not IF_WAITING
invoke GetOverlappedResult, hCom, addr stReadState, addr @ dwBytesRead, FALSE
. If eax! = 0
mov eax, @ dwBytesRead
. If eax! = 0
; Here is the received data processing
. Endif
. Else
; Here is the error handling
invoke ClearCommError, hCom, addr @ dwError, addr @ stComStat
. Endif
. Else
; Here is the error handling
. Endif
. Endif
. Endw

7 flow control problems

In flow control mode for the "no" and "software controlled" circumstances, basically no problem, but the "hardware control" under, win32 manual control method described in RTS_CONTROL_HANDSHAKE meaning is:

Enables RTS handshaking. The driver raises the RTS line when the "type-ahead" (input) buffer is less than one-half full and lowers the RTS line when the buffer is more than three-quarters full. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.

That is, when the buffer is full when the fast OFF RTS will automatically send notice to the other suspended, when the buffer is empty again came out, RTS will be automatically ON, but I found that when RTS OFF after changing the buffer even if you have empty , RTS will not automatically ON, causing the other party do not stop there, sent in, so if the hardware flow control to use it, even with the best detection in the receiving buffer size after the judge, after the concrete is used to return ClearCommError The COMSTAT.cbInQue, when the buffer is already empty out when to use invoke EscapeCommFunction, hCom, SETRTS re-RTS is set to ON.

These are the serial communication programming I found the real problem, if there are discrepancies and where practical, or other questions, welcome to the forum of programming.







Recommended links:



Basic Or VB Or VB DotNet Report



Dell CEO or forced to replace him within a six potential successors to the election



Using warm and intimate small music prompted the fish that you're familiar with the music fish



Jinshan Jinshan Nu Pi Typing Through Repeated Fake "Li Gui," Poisonous Pit Users



My Favorite Printer



Introduction to Fibre Channel based: FCIP and iSCSI comparison



Registry combat Collection - "Operation" Change Collection



avi to mp4 converter free download



Browser Tools for you



Orient Securities Executive Assistant Shu Wang: grab the share of off-site transactions



My Favorite Management And Distribution



Alternative workplace quit: to a rival company to do an undercover intelligence probe



mov to mpeg converter free



M2TS to mov



Realplayer H.264



Navigator V6.0 grand public



Customer is not his wife is a lover of God is



Thursday, July 29, 2010

Taiwan 3G competition for business opportunities in the Mainland 300 000 000 000



According to reports, the two sides bridge communications industry meeting held on June 3, China Taiwan, "Ministry of Economic Affairs," Minister Wong was optimistic about the future of the ball 1 to 2 years of 3G mobile phone market in China will reach 150 million, China 3G terminal size of about 600 billion yuan Taiwan businessmen are expected to be 60 billion yuan of which took away (about 300 billion yuan NT) business opportunities.




Liu Liqing of China Association of Communication Enterprises (left) attended the opening ceremony of China Taiwan, "Ministry of Economic Affairs," Vice Minister Huang Jung (right), gifts

The largest ever cross-strait bridge communications industry conference "cross-strait industrial cooperation and the exchange of communications meeting" from June 3 starting at 2 days in Taiwan. Cross-strait communications about 500 participants, China by the China Association of Communication Enterprises Association Delegation in Beijing traffic information about 100 people to the conference.

General Assembly President, ITRI long-Lee says that last year, output value of China Taiwan communication industry has exceeded 1 trillion yuan NT, China's telecommunications equipment manufacturing output has exceeded 3 trillion yuan, showing a strong cross-strait communications industry capacity. China Taiwan IC design industry in the information and end products to enjoy high global market share, China is the center for production of communications equipment, combined with the two sides will be able to complement each other.







Recommended links:



2008 Zhongguancun Top Ten News: PREMIER Wen inspected Zhongguancun selected



Flv to mp4 converter free download



Mov to avi converter free



Fiber Optic Transceivers, "Li Gui," True Features



Alibaba denies rumors of financial Strand breaks from Baidu



Assembly instructions and the machine code of each conversion



eHR Four Party Advisory Misunderstanding



IDS weaknesses and LIMITATIONS (2)



CSS Mouse Properties



comments Inventory And Barcoding



Video format for blackberry



The very moment of WiMAX



What is mov



Comparison Investment Tools



Easy to use Font Tools



Monday, July 12, 2010

China's environmental satellite data


China will next year set up the environment and disaster monitoring and forecasting satellite constellation system. The Constellation system will be composed of eight small satellites. Next year will launch the first of three small satellite constellation system. Experts told the reporter opened the magic veil of environmental satellites.

Construction of the three systems for environmental monitoring "dragnet"

Environment and disaster monitoring and forecasting of small satellite constellation by the satellite system, ground system, application system has three major components. SEPA Environmental Satellite Center Preparatory Office of the Deputy Director Wang Kiu, the researchers said satellite system is a satellite platform and payload, data transfer and in-orbit operations under the management of content; ground system includes standardized data receiving and processing, distribution services and the satellite payload operation and management of business content; applications mainly related to satellite remote sensing data in various fields of application, application-specific goals that focus on data analysis and data processing applications and production.

Small satellites and large satellite constellation system is the difference between it by a number of small satellites, compared with a low cost, high resolution characteristics of an integrated space-time. From satellite data back to the ground through the ground system for receiving, processing, and ground systems can also be necessary to adjust the satellite attitude. After receiving the computer down massive data processing, analysis, formation of data applications is what we often see in daily life satellite photos in order to be environmental and disaster monitoring departments to timely and accurate technical support for decision-making.

Currently China has more than 2000 environmental monitoring stations, each year produces 30 million environmental monitoring data, but our environment and disaster monitoring and research tools essential to stay in the conventional stage, can not adapt to sustained and stable economic and social development. China's environmental satellite ground with existing environmental monitoring stations together constitute the three-dimensional environment monitoring system, to achieve large-scale, timely, dynamic environment and disaster monitoring.

Civilian satellite has a family of "bright star"

State Environmental Protection Administration Secretary Zhao Yingmin technology standards, said: "Over the past on a survey of national ecological environment time-consuming, but also spent heavily, and the use of satellite technology, you can quickly and large-scale observation of the atmosphere, soil, vegetation and water quality conditions, offer the basis for environmental protection. "

Environmental satellite is China's second weather, ocean, land resources satellites after a new civilian satellite. Environment and disaster monitoring and forecasting of small satellite constellation by a number of small satellites, is equipped with a wide coverage of a CCD camera, infrared cameras, hyperspectral imager, synthetic aperture radar (SAR) sensors and other types of advanced earth observation system is currently the most technologically sophisticated civilian satellite, targets the most advanced systems.

Early 90s of last century, the State Environmental Protection Administration, the National Disaster Reduction Committee and the Aerospace Science and Technology Group co-sponsored the construction of environment and disaster monitoring and forecasting of small satellite constellation system recommendations. In 2000, the environment and disaster monitoring and forecasting of small satellite constellation to be included in the "Chinese civilian space program and, after 15 years of planning"; in 2001 the "White Paper on China's space" was listed as civilian satellite development priorities; February 2003, environment and disaster monitoring and forecasting of small satellite constellation project approved by the State.

Two stages to create a sound environment for satellite constellation system

Environment and disaster monitoring and forecasting systems, the small satellite constellation system to the owners, the State Environmental Protection Administration and the National Disaster Reduction Committee for the owners of satellite units are responsible for satellite operations management and applications development.

鎸夌収璁″垝锛岀幆澧冧笌鐏惧鐩戞祴棰勬姤灏忓崼鏄熸槦搴у皢棣栧厛寤虹珛鐢?棰楀厜瀛﹀皬鍗槦锛堢幆澧冧竴鍙稟锛孊锛夊拰1棰楀悎鎴愬瓟寰勯浄杈惧皬鍗槦锛堢幆澧冧竴鍙稢锛夌粍鎴愮殑鈥?+1鈥濇槦搴э紝绠?О鈥滅幆澧冧竴鍙封?锛堜唬鍙稨J-1锛夛紱绗簩闃舵灏嗛噰鍙栬祫婧愬叡浜殑鏂瑰紡锛岀Н鏋佸紑灞曞浗闄呭悎浣滐紝瀹屾垚鐢?棰楀厜瀛﹀皬鍗槦鍜?棰楀悎鎴愬瓟寰勯浄杈惧皬鍗槦缁勬垚鐨勨?4+4鈥濇槦搴э紝瀹炵幇鍏ㄧ悆鐜涓庣伨瀹冲姩鎬佺洃娴嬨?鐩墠锛屽湪寤虹殑鈥?+1鈥濇槦搴т腑锛屽崼鏄熷拰浼犳劅鍣ㄦ鍦ㄦ牴鎹爺鍒舵?瑕佹眰杩涜鐢熶骇锛岄璁?007骞翠笅鍗婂勾鍙戝皠銆?br />





相关链接:



AVI to mp3



Youtube FLV to Xbox 360 Deluxe



Youtube Movie to Flash Help



Specialist Dial Up And Connection Tools



Converting .mov To .wmv



Ts Format



Moyea Video To iPod Converter



Merry CDA Sound AAC to M4A Editing



Apolo RM Converter



mkv file



Review Password Managers



Youtube Movie To MOV Pack



Youtube Video Save + Player Plus