Sunday, October 24, 2010

Second-generation CAD, on-demand and variable - Hao Chen demonstrated CAD 2009 series New



Famous computer-aided design solutions (CAD) provider Hao Chen Corporation (Gstarsoft), on April 2, 2009 in Beijing Hao Chen 2009 full program release seminars, more than 300 design institutes to the participating executives, journalists demonstrated its latest second-generation total solution - stable high-speed platform, fully compatible with the secondary development interface and changing on demand applications. Survey and Design Association of China Wu Yi-liang, the Copyright Office, Copyright Office, the Director of China Zhao Xiu-ling, Li Aimin, chairman of China Power Industry Association will be all to high standards and high enough to appear in the Chinese domestic software has erected a banner in mind.



Figure 1: The General Assembly site





Figure 2: Survey and Design Association of China Mr Wu Yiliang





Figure 3: China's Copyright Administration, the Director of the Copyright Office, Zhao Xiuling speech





Figure 4: Hao Chen Executive Vice President Liang Haixia keynote speech



Rapid increase in the competitiveness institute

Today, the software product homogeneity led to increasing competition, the increasing emphasis on innovative users, the design cycle and the lack of software capabilities have become increasingly prominent due to cost pressures. How to find a price performance ratio, while there are good solutions for applications based on mature and all information put on the agenda of the person in charge. In today's conference, Hao Chen (Gstarcad) 2009, Hao Chen CAD Architecture 2009, CAD structure 2009 Hao Chen, Hao Chen CAD Electrical 2009, Hao Chen CAD HVAC 2009, Hao Chen CAD to drain 2009, and TUS structure FOR Haochen software upgrade for the first time debut. Single these shining star, they drew to the scene of intense media attention over 30.

Application to lead a new era of mature

It is reported that, despite the domestic software development momentum in recent years, good, but still faces the user should not be used to purchase only the passive situation, mainly because foreign manufacturers are still technically in some applications take initiative. Hao Chen order to break this situation, efforts to upgrade domestic software application in the user base. At the meeting, Hao Chen together three typical customer: Beijing Urban Construction Design Research Institute, Taiyuan Institute of Architectural Design, the Northwest Municipal Engineering Design Institute of China Research Institute Company Limited, the CAD system, complete software application Hao Chen, will be integrated with other professional software Hao Chen Hao CAD platform, e-based CAD software and custom software applications mature and comprehensive display. At the meeting, the three leading design institute of the year not only described the circumstances surrounding the purchase of CAD Hao Chen also mentioned the application of domestic joy was genuine CAD experience of the advanced units, speech content and even includes a custom software practice. True, inspiring, so to will have many guests on the latest version of the current Haochen CAD2009 have greater expectations.

Application and the actual needs of mature combination

To allow users to have the best experience effects, Hao Chen set up the user to visit links in particular. Location was selected in the Ho-Chen users - known as the China Rail Transit Design and Research Institute Beijing Urban Engineering Design experts. Users want seeing is believing, but events like this design institutes in China there was very little to start. Experience at the Urban Institute, the user visited the Beijing Urban Construction Exhibition Centre 50th anniversary of the style, understand the Beijing Olympic Subway Line, on the 10th line, and other famous works of the construction process, but also heard a designer for Urban School Leadership and procurement, the use made by the exchange of experience.

It is reported that Hao Chen's second-generation CAD Application Conference is the beginning of the global publishing activities, the next, Hao Chen will also be 6 new International Exhibition Center in Beijing International Machine Tool Show held together CIMT Session manufacturing conference, around the same time also The corresponding exchange activities have been launched. In addition to China, Hao Chen will also be key agents of its overseas markets, together with multi-language version of the application Juban exchange seminar will be this really great concentration for 17 years, set the desired product many users spread around the world, China set a good Software brand.







Recommended links:



Do not worry! Three-trick to help You pick a good memory



AVI to MOV



Freehand also do Flash animation



Easy-speed run 47 hours to restore the SECRET



Top Network And Internet



DivX to 3GP



MOV to MPEG4



Who in the "high ABSORPTION charge phone" incident lying



creating sql database connection in Asp.net web



From Gray To Color: The Breakthrough Identification Documents



"Batman Arkham asylum" after Playing a little bit of getting



Leads by the example of the counter (C #)



Comment Audio Speech



Compact midrange Disk arrays, space S2500



JMP Fine China Senior DOE Effort To Build Training Courses



Tuesday, October 19, 2010

Terminal promotion on doing some of the views



At present, the terminal promotion is an important place for direct contact with consumers, but also between us and other competitors, the first close combat battlefield. Terminal promotion is the promotion of many enterprises often do way, it can make the sales volume increased rapidly in the short term, better communication with customers face to face, to effectively expand market share and the suppression of competition, etc..
The importance of terminal sales has been more and more marketers recognized and accepted as a marketing session was a very important part, the major marketing journals have not hesitated to study and discuss a huge issue, one time " Marketing will be called the terminal ", of course, became marketing profession," said the topic had to "end the process of promotion in the marketing impact of the power of the evident. Terminal promotion is a comprehensive work, the industry is "benevolent see benevolence and the wise see wisdom," How to Terminal with 12 promotional articles can not express clearly, and I here in the promotional marketing terminals express her humble opinion , could you bring some colleagues to help. Are the main talking from the following aspects:

First, make preparations before promotion

Our first task is to end sales promotion before the preparations. Marketing purposes according to the terminal select the appropriate promotions, first of all have promotional purposes, such as: 1. When we had just time to market of new products, in order to make consumers familiar with our new products as soon as possible, to promote the sales of our new products; 2 . for potential customers trying to buy or use; 3. To reduce the bad old products out of the market inventory to prevent conflicts old and new product promotions carried out; 4. In order to improve overall sales and marketing carried out against our competitors; 5. Anti- "promotion" and for the promotion; 6. can and consumers face to face communication, improve consumer familiarity of our products, building consumer loyalty for our products and reputation; 7. to promote the sale of our terminals volume, to bring a more prosperous end of our popularity and profits, help us to establish a good customer and end romantic relationships.

Terminal promotions can be said to be very complicated, in order to avoid a work of sloppiness will not affect the promotion process, the need to prepare work breakdown responsibilities, and individuals to provide for the completion of time, according to a fixed personnel inspection, promotion Confirm work place. Activities related to staff before making contacts, to ensure easy connection, while understanding the marketing process and the serious end of the contact problem of the terminal to find the person in charge contact.

Adequate supply is the basis for the smooth promotion, promotion, if out of stock after the beginning of the phenomenon is a direct impact on our sales results. We can determine the scale of promotion promotional products, reserve quantity, such as appliance sales are 100 units in peacetime, when the sales promotion is expected to raise 30%, then at least to prepare 130. Promotional activities related to pre-sales staff to implement the orders, to ensure that activities have sufficient inventory during the terminal. Promotional activities must be well the day before the product shelves, Duitou tallying, posted a good price tag, good layout of promotional materials, etc., to avoid the day of the event before we do, cause confusion in the scene, not only will cause inconvenience to our terminal, but also affect our publicity.

Second, selected a suitable promotion strategy

Marketing promotion strategy is the theme of thinking, we now have a special promotion strategy commonly used strategy, accompanied by gifts, discounts and so on.

How to choose the right marketing strategy is good if we can do a good job marketing the key. If this is our new products, because consumers may not know this product is almost, so we select the promotional strategy, it should fully consider how to expand the visibility of the product, how quickly accepted by consumers of this product. Then do comes with gifts and promotional staff to stimulate the consumer is a better marketing strategy. When our new products, promotions through the previous, our new product will be in a certain impression on the minds of consumers, some consumers will be recognized at this time is the time when rapid growth of our sales, time growth stage of our new products. Our marketing strategy in the selection, should consider how to further expand the visibility and reputation of our products, to promote the potential target customers to buy the products, to maintain the loyalty of existing consumers. Accompanied by gifts, discount vouchers, special promotions, are a good promotion strategy. We should also take into account the promotion strategy and promotion competitors actions, competitors will try every means to crack down on our product sales growth. At this point should be based on the characteristics of our own products, provides a fixed product variety as a check. (For example: When other brands are playing special induction cooker, we can play with NKC-18L1 special products as check the price slightly lower than other brands and comes with gifts.)

Third, choose a good timing and means of promotion

The timing and means of promotion, with the purpose of promotion varies, as follows:

1, in order to influence new product promotions undertaken by the timing of new product launch, the country had just started listing, the focus of such promotion is to highlight the product's "personality", according to product positioning, target Consumer groups, on the one hand can be formed by the media influence, on the other hand is the target consumer group for the characteristics of terminal sales. Terminal on-site promotional activities to attract the target consumer group for the characteristics to explain the product's "personality", so that consumers understand and agree with the scene of this product a "personality" to target consumers desire to purchase the product, coupled with giveaways and other incentives final form to purchase.

2, the old product out of the market prior to marketing the main purpose is to reduce the adverse stock, to make way for new products, to avoid the introduction of new products, new and old products generate internal contradictions, so that sales can not be in accordance with the positive development. Out of the market before the product should be applied at low or mid-range price strategy of promotional products, so consumers really feel the benefits brought to them.

3, in order to improve the overall sales promotions to focus on products more light, clear differences between the goods on the season, general season into a large, terminal sales are strong. Promotional competition is mainly price and promotional items, but competition in the domestic businesses to take measures in the monotonous, mainly to the price war, if more of the market segments, focusing on marketing differentiation, will achieve better market share.

4, against "promotion" and for the promotion is to promote in the case of competitors, in order to curb the momentum carried out by rival promotion, such promotion has no fixed pattern, to borrow the words of Sun Tzu, "Promotion of Things Past, high water line to avoid becoming, the promotion and avoid the attack is true, the water flow due to the system, promotion by the enemy and winning, so water has no fixed potential, promotion has no fixed form, can change because of the enemy that victory by God, so Five wins impermanence, 4:00 uncertain position, on a length, on a life and death. "anti" promotion "is the most critical change for the enemy to win.

Fourth, to create an atmosphere of good marketing

We look at how to achieve sales, and products - What is the process consumers completed the first, consumers have a realistic potential buyers to purchase requirements or needs; Second, consumers desire to purchase; third, consumer impulsive buying; fourth, to buy it; if desired, we also hope that the fifth, consumers told us: he (she) will be realized once again the people around to buy. Consumer demand into actual demand and potential demand for two, but no matter what kind of conversion needs to buy the ultimate desire to buy, if there is no external stimulation is not achieved. Consumers desire to purchase up to impulsive buying, buy the external stimulation to achieve what it? So, let's look at a person's feelings, mainly visual, hearing, touch, smell, taste, etc., that have some people that can stimulate the sense of these aspects, we have what should be in the terminal promotion play? Of course, different products have different treatment, which some feel should be the nature of the product combines the advantages of playing all can play. So, how in the end that should be combined with promotion of our own products, features, what kind of work to do to stimulate the consumer's sense organs, thereby enhancing their purchasing desire? To consumers buying desire to achieve purchasing behavior, we must make the consumer product sales to the scene, which requires analysis of how the far and near, to stimulate consumer senses, this is mainly to stimulate the consumer's visual and hearing. According to the characteristics of different products to the terminal layout of the image or sound, how different from a distance appears to give consumers the feeling, to be theme specific, with features to consumers a strong visual impact. If possible, decorated with auditory impact, attracting the attention of consumers, in front of the consumer guide to products. Consumer products to display the scene, from the vivid scene of the terminal display to stimulate the attention of consumers, coupled with the professional sales staff to explain and change product features as a selling point to explain the selling points when it turned into selling points, to promote the interests of customers. Introduce products to meet consumer demand for that on the one hand, stimulate the purchase desire of consumers to enable consumers to purchase impulse, and ultimately purchase, which is part of the impact of hearing; to explain the same time, enable consumers to access products, on the one hand make consumers feel good thing is real; the other hand, to the consumers feel this product is belongs to him (her) own, and aspiring to promote officers to explain, from the auditory, visual and tactile stimulation at the same time three different neural consumers, and ultimately purchase. So, in creating an atmosphere of live promotion, the full account of the different consumers feel, from the visual, auditory and tactile and so on, to create a promotional atmosphere; the same time, some people also consider the nature of the problem, such as the curiosity of consumers and consumer The conformity of consumption, then the design of specific atmosphere, will achieve the desired effect.

Fifth, do a good job monitoring promotions

Monitoring of promotional activities is related to the success of our entire promotion a key element. Position in the promotional activities are important, many of our promotional activities despite the clever concept and design, but if there is no implementation of promotional activities is no effective monitoring or surveillance will not only result in our promotions do not achieve the desired results, even We also have a negative impact to the detriment of our company's image and reputation. What we need to monitor it? Kind of monitoring how the most effective?

Monitoring whether the due diligence work of promoters, promoters of a good process in the role of marketing is very large, can not be ignored. Promotion officers are our customers and channel members with connections between the bridge is our eyes. Therefore, due diligence or sales personnel will directly affect sales of our products and our company's image. The most effective and simplest way is to use reports to monitor the system, according to the characteristics of our own marketing staff to develop statements of work (such as: daily report, weekly report, monthly report). The contents of the report are: the number of each day to receive gifts, gifts consumption, returning the situation, performance of the day promotion, competition, brand sales feedback, and other unusual information. Monitoring sales staff time if due diligence, there is no late and leave early, channeling Kong, promotional products, the adequacy of display, display is clean and tidy, promotions and other publicity materials is complete and the situation.

Promotional staff reward and punishment system, a reasonable reward and punishment system can maximize the sales staff mobility initiative to improve the accuracy of daily reports to ensure the smooth progress of promotional activities.

Monitoring of all channel members of the specific stocks, with the promotion time, participate in activities will gradually increase the number of consumers, accurate inventory control channel members to replenish their stocks in time to prevent stock-out occurrence, but also facilitate the promotion sales statistics, more conducive to promotion goals.

Monitor the management of promotional gifts, promotional personnel as channel members and the quality varies greatly, and therefore strengthen the management of promotional gifts, can effectively prevent the deduction of gifts from occurring, to maintain our company's image and interests, to ensure the smooth progress of our promotional activities.

Monitor competitor sales, promotional activities we are doing but also pay close attention to competitors at the same time reflect and sales, and if we do promotions, competitors do the same promotions and marketing efforts of our sales incentives than also, in this case we should promptly adjust promotional content, and apart from competitors in order to achieve the expected effect of promotion.

6, do a good job of summing up promotions

Summarize the effect of promotion is very important, good promotions to help sum up the terminal and our next promotional activities do better. Allow the terminal feel that our professional style. Promotion effect of summing up not only after the end of promotion, but promotion activities throughout the entire process.

Promotion of product sales during the summing up of the products before marketing, promotion, the promotion of sales after the analysis summary. Promotion to enhance the rate of product sales, such as this promotion is expected to enhance product sales 30%, then the actual sales after the event how much has not completed the expected sales target. If not completed expected sales target, to know from how much worse the expected sales goals, analysis not complete anticipated sales goal. Find out the reasons to work in the future to avoid recurrence of similar problems in order to improve the efficiency of our terminals.

Summary competitive brand sales in the promotional period, the period of competitive brands in the promotion of specific sales data, this promotion of competition would affect sales of the brand. Summarized under the normal sales and competition What is the difference between brands? After promotion with or without improvements? Promotional activities on the terminal information analysis, feedback, concluded that the best way to promptly correct the deviation, the next promotion will avoid a lot of lessons.

Terminal sales staff is the implementation of promotional activities, who is also a trivial end promotions and huge work, we have invested heavily in every promotion of human and financial resources, it requires that the sales staff in the daily work to lay a good sales basis (for example, the display position in the end the poor sales of the product variety not complete, and love the relationship between the passenger terminal is not in place. this end, we put more of the cost of doing sales promotion can not be achieved to improve and expand the brand known results.) position to do daily work, when we do promotions to achieve better results are expected.







Recommended links:



How to locate AND win the consumer's mind



Do Small Business Know-how To Master The Four



Competition for the traditional blog blog ecosystem change into sub-stages



how to fix Hidserv.exe quickest way to fix it



CMM assessment in China Suggestions



Recorded with the popular film of your wonderful life



Comparison Of Six Agent Approach



Simple Network And Internet



AVI to Zune



Longhorn can be run on some old computer



RM to MPEG4



Transport Stream converter



Review File COMPRESSION



Saturday, September 25, 2010

Create a simple window


In this lesson we will write a Windows program, it will display a standard desktop window.

Theory:

Windows program, in writing graphical user interface needs to call a large number of standard Windows Gui function. This is indeed beneficial to both users and programmers, for users, face a window with a set of standards, the operation of these windows are the same, so use a different application without having to re-learn operation. To the programmer, these are after Gui source code of Microsoft's rigorous testing can be used at any time bring. As for the specific course, to write programs for programmers still difficult. In order to create a window-based applications, must strictly abide by the norms. Achieve this is not difficult, as long as the use of modular or object-oriented programming can be.

I have listed below a window in the desktop display a few steps:

Get your application handle (required);
Get command line parameters (if you want to get from the command line parameters, optional);
Register window class (required, unless you use the Windows predefined window class, such as the MessageBox or dialog box;
Create window (required);
Display window on the desktop (required unless you do not want to immediately display it);
Refresh the window client area;
Access to unlimited access to the window message loop;
If there is a message arrives, the window for the window callback function processing;
If the user closes the window, to exit the deal.
Compared to single-user programming under DOS is, Windows the procedure under the framework structure is quite complex. However, Windows and DOS in the system architecture is completely different. Windows is a multitasking operating system, so the system while there are synergies between multiple applications running. This requires Windows programmer must strictly comply with programming specifications, and to develop good programming style.

Content:

Here is our simple window program's source code. Enter the complex details, I will outline key points focused on the vital territories of points:

You should use the program to all the constants and the structure of the declaration into a header file, and the beginning of the source code contains the header files. To do so will save you a lot of time, so that once again Qiaojian Pan. Currently, the most perfect is the hutch to write header files, you can go to the hutch or my website. You can also define your own constants and structure, but the best put them in a separate header file
With includelib instructions, including your program to the library file, for example: if your program to call the "MessageBox", you should add the following line in the source file: includelib user32.lib This statement tells MASM that your program will use some to introduce library. If you reference more than a library, simply adding includelib statement, do not worry about how to deal with so many linker library, as long as the link with the link switch / LIBPATH can specify the path where the library.
Use in other parts of the definition of function prototypes in header files, constants, and structure, it is necessary to maintain and strictly defined in the same header file, including the case. Function definition in the query, this will save you a lot of time;
Compile, link with the makefile file, remove duplicate keystroke.
.386
. Model flat, stdcall
option casemap: none
include masm32includewindows.inc
include masm32includeuser32.inc
includelib masm32libuser32.lib; calls to functions in user32.lib and kernel32.lib
include masm32includekernel32.inc
includelib masm32libkernel32.lib

WinMain proto: DWORD,: DWORD,: DWORD,: DWORD

. DATA; initialized data
ClassName db "SimpleWinClass", 0; the name of our window class
AppName db "Our First Window", 0; the name of our window

. DATA?; Uninitialized data
hInstance HINSTANCE?; Instance handle of our program
CommandLine LPSTR?
. CODE; Here begins our code
start:
invoke GetModuleHandle, NULL; get the instance handle of our program.
; Under Win32, hmodule == hinstance mov hInstance, eax
mov hInstance, eax
invoke GetCommandLine; get the command line. You don''t have to call this function IF
; Your program doesn''t process the command line.
mov CommandLine, eax
invoke WinMain, hInstance, NULL, CommandLine, SW_SHOWDEFAULT; call the main function
invoke ExitProcess, eax; quit our program. The exit code is returned in eax from WinMain.

WinMain proc hInst: HINSTANCE, hPrevInst: HINSTANCE, CmdLine: LPSTR, CmdShow: DWORD
LOCAL wc: WNDCLASSEX; create local variables on stack
LOCAL msg: MSG
LOCAL hwnd: HWND

mov wc.cbSize, SIZEOF WNDCLASSEX; fill values in members of wc
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc
mov wc.cbClsExtra, NULL
mov wc.cbWndExtra, NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground, COLOR_WINDOW +1
mov wc.lpszMenuName, NULL
mov wc.lpszClassName, OFFSET ClassName
invoke LoadIcon, NULL, IDI_APPLICATION
mov wc.hIcon, eax
mov wc.hIconSm, eax
invoke LoadCursor, NULL, IDC_ARROW
mov wc.hCursor, eax
invoke RegisterClassEx, addr wc; register our window class
invoke CreateWindowEx, NULL,
ADDR ClassName,
ADDR AppName,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInst,
NULL
mov hwnd, eax
invoke ShowWindow, hwnd, CmdShow; display our window on desktop
invoke UpdateWindow, hwnd; refresh the client area

. WHILE TRUE; Enter message loop
invoke GetMessage, ADDR msg, NULL, 0,0
. BREAK. IF (! Eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
. ENDW
mov eax, msg.wParam; return exit code in eax
ret
WinMain endp

WndProc proc hWnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM
. IF uMsg == WM_DESTROY; if the user closes our window
invoke PostQuitMessage, NULL; quit our application
. ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam; Default message processing
ret
. ENDIF
xor eax, eax
ret
WndProc endp

end start

Analysis:

A simple Windows program to see so many lines, you are not a bit like withdraw? But you need to know is above most of the code is just the template, the template means entails the code on almost all standard Windows programs it is the same. Writing Windows programs, you can copy the code to copy to, of course, write code to duplicate one of these libraries are also very good. In fact, the real focus to write the code in WinMain. This is the same number of C compilers, do not be concerned with other chores and concentrate on the WinMain function. The only difference is the C compiler source code requires that you have to have a function called WinMain. Otherwise, C will not know which functions and the code around the link. Relative C, assembly language provides greater flexibility, it does not require a force called WinMain function.

Now we start analyzing, you can get mentally prepared, this is not a very easy living.

.386
. Model flat, stdcall
option casemap: none

WinMain proto: DWORD,: DWORD,: DWORD,: DWORD

include masm32includewindows.inc
include masm32includeuser32.inc
include masm32includekernel32.inc
includelib masm32libuser32.lib
includelib masm32libkernel32.lib

You can be the first three lines as a "must".

.386 Told us to use 80386 instruction set MASN.
. Model flat, stdcall tell MASM we use memory addressing modes, where you can join the stdcall tell MASM we use the agreed parameters.

Next is the WinMain function prototype affirm, because we later use to the function, it must be declared. We must include window.inc file, because it contains a lot of use to the constant and the structure is defined, the file is a text file, you can use any text editor to open it, window.inc not contain all the constants and structure definition, but hutch, and I have been constantly adding new content. If you temporarily can not find in window.inc, you may also join.

Our program calls stationed in user32.dll (example: CreateWindowEx, RegisterWindowClassEx) and kernel32.dll (ExitProcess) in the function, it must link two libraries. Then if I ask: what library you need to chain into your program? The answer is: first find the function you want to call any library, and then included. For example: If you want to call the function in gdi32.dll, you must include gdi32.inc header file. And compared with MASM, TASM will have to be much simpler, you can simply introduce a library that is: import32.lib.

. DATA

ClassName db "SimpleWinClass", 0
AppName db "Our First Window", 0

. DATA?

hInstance HINSTANCE?
CommandLine LPSTR?

Followed DATA "section." In. DATA, we defined two to NULL terminated string (ASCIIZ): ClassName which is the Windows class name, AppName is the name of our window. These two variables are initialized. Not initialize volume on the two sides. DATA? "Section" in which representatives of the application handle hInstance, CommandLine save the parameters passed from the command line. HINSTACE and LPSTR name the two data types, which are defined in the header file, an alias can be seen as a DWORD, the reason for such a re-set just to easy to remember. You can view windows.inc files in. DATA? The variables are not initialized, which means that the program has just started what their values are irrelevant, just hold a piece of memory, the future can re-use it.

. CODE
start:
invoke GetModuleHandle, NULL
mov hInstance, eax
invoke GetCommandLine
mov CommandLine, eax
invoke WinMain, hInstance, NULL, CommandLine, SW_SHOWDEFAULT
invoke ExitProcess, eax
.....
end start

. DATA "section" contains all your application code that must have been. Code and between the end. The label's name as long as the Windows standard and to ensure compliance with the only the specific name does not matter what Dao Shi. We process the first statement is called GetModuleHandle to find the handle to our application. In Win32, the application handle and module handle is the same. You can handle as an instance of your application ID. We call some function is regarded as a parameter to be passed, it will be at the beginning and saved it can save a lot of things.

Special Note: WIN32 handle to the next instance of your application is actually a linear address in memory.

WIN32 functions in the function return value if it is to pass through the eax register. The value of other parameters can be passed in. return address. A WIN32 function is called when the segment register and always keep it ebx, edi, esi and ebp registers, while the value of ecx, and edx is always uncertain and can not return is to apply. Special Note: From the Windows API function return, eax, ecx, edx call in the value and not necessarily the same as before. When the function returns, the return value is placed in eax. If your application available to the Windows function calls, we must also respect the point, that is, at the entrance to save the segment register in the function and ebx, esp, esi, edi and the function returns the value of the resume. If not this way, then your application will soon collapse. From your program, call the function available to Windows in general there are two: Windows window procedure and the Callback function.

If your application does not handle the command line then do not call GetCommandLine, here is just to tell you how to do it if you want to call should be.

Here is the call to WinMain a. The function of a total of four parameters: the application instance handle, the application of the previous instance handle, command-line parameters string pointer and a window to display. Win32 does not handle the concept of the previous examples, so the second parameter is always 0. The reason is to keep it and Win16 compatibility considerations, in Win16, if hPrevInst is NULL, then the function is first run. Special Note: You do not have to declare a function called WinMain, in fact, in this respect you can completely decide that you do not even have an equivalent function and WinMain. As long as you are copying it GetCommandLine WinMain code after the function they achieve exactly the same. In the WinMain returns, the return code into eax in. Then by the end of the application ExitProcess function to the return code passed to Windows.

WinMain proc Inst: HINSTANCE, hPrevInst: HINSTANCE, CmdLine: LPSTR, CmdShow: DWORD

The above definition is WinMain. Note that with the proc command after the parameter: type form of parameters, which are passed to WinMain by the caller, and we quote directly using the parameter name can be. As for the stacking and the balance of return stack when the stack at compile time by the MASM before adding the relevant order and the order of assembly instructions to carry out. LOCAL wc: WNDCLASSEX LOCAL msg: MSG LOCAL hwnd: HWND LOCAL pseudo-instruction for the local variables on the stack allocated memory space, all the LOCAL directive must be followed after the PROC. LOCAL followed by a statement of the variables in the form of the variable name: variable type. For example, LOCAL wc: WNDCLASSEX that tells MASM to the local side called wc amount allocated in the stack length is the length of WNDCLASSEX structure memory space, then we use the local variable is no need to consider the stack, taking into account under DOS compilation, to say that this is a gift. But this requires that local variables declared at the end of the release of the stack in the function room (that can not be referenced in function in vitro), another drawback is that you can not initialize because your local variables, have to again later in another their assignment.

mov wc.cbSize, SIZEOF WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc
mov wc.cbClsExtra, NULL
mov wc.cbWndExtra, NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground, COLOR_WINDOW +1
mov wc.lpszMenuName, NULL
mov wc.lpszClassName, OFFSET ClassName
invoke LoadIcon, NULL, IDI_APPLICATION
mov wc.hIcon, eax
mov wc.hIconSm, eax
invoke LoadCursor, NULL, IDC_ARROW
mov wc.hCursor, eax invoke
RegisterClassEx, addr w

The above lines from the concept that really are very simple. As long as a few lines of instructions can be achieved. The main concept is the window class (window class), a window the window class is a specification, this specification defines a window of several major elements, such as: icons, cursors, background colors, and is responsible for handling the window function . When you generate a window must have such a window class. If you want to generate more than one window of the same type, the best way is to store up to the window class, this method can save a lot of memory space. Maybe today you will not feel too much, but look at the most only 1M PC memory, to do so is necessary. If you want to define your own window class must be created: In a WINDCLASS or WINDOWCLASSEXE structure of the constituent elements indicate your window, and then call the RegisterClass or RegisterClassEx, Then according to the window class created window. Windows on the different characteristics of different window class must be defined. WINDOWS There are several predefined window class, such as: buttons, edit boxes, etc.. To generate the kind of style of window is not required to redefine the window class, and as long as the package pre-defined class class name as a parameter can call CreateWindowEx.

The most important members of the WNDCLASSEX than lpfnWndProc the. Prefix lpfn that the member is a pointer to a function of the long pointer. In the Win32 memory model is FLAT because of type, there is no difference between near or far. Each window class must have a window procedure, when the Windows window belonging to a specific message to the window, the window of the window class to deal with all the news, such as a keyboard or mouse message message. As the process window intelligently handled almost all of the windows message loop, so you just joined the message in which the process can be. Now I will explain each member WNDCLASSEX

WNDCLASSEX STRUCT DWORD
cbSize DWORD?
style DWORD?
lpfnWndProc DWORD?
cbClsExtra DWORD?
cbWndExtra DWORD?
hInstance DWORD?
hIcon DWORD?
hCursor DWORD?
hbrBackground DWORD?
lpszMenuName DWORD?
lpszClassName DWORD?
hIconSm DWORD?
WNDCLASSEX ENDS

cbSize: WNDCLASSEX size. We can use the sizeof (WNDCLASSEX) to obtain accurate values.
style: class derived from this window, the window has style. You can use "or" operator to put some style or together.
lpfnWndProc: window handle function pointers.
cbClsExtra: specified immediately after the window class structure for the additional bytes.
cbWndExtra: examples in the window after the specified followed by additional bytes. If an application using the resources CLASS pseudo instructions to register a dialog class, then the member must be set to DLGWINDOWEXTRA.
hInstance: The instance handle of the module.
hIcon: Handle of the icon.
hCursor: cursor handle.
hbrBackground: background brush handle.
lpszMenuName: a pointer pointing to the menu.
lpszClassName: a pointer pointing to class name.
hIconSm: and the small icon associated window class. If the value is NULL. Put the hCursor the icon into the appropriate size of small icons.
invoke CreateWindowEx, NULL, ADDR ClassName, ADDR AppName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL,
NULL, hInst, NULL

Register window class, we will call CreateWindowEx to create the actual window. Please note that the function has 12 parameters.

CreateWindowExA proto dwExStyle: DWORD, lpClassName: DWORD, lpWindowName: DWORD,
dwStyle: DWORD, X: DWORD, Y: DWORD, nWidth: DWORD, nHeight: DWORD, hWndParent: DWORD, hMenu: DWORD,
hInstance: DWORD, lpParam: DWORD

We take a closer look at these parameters:

dwExStyle: Add window style. Compared to the old CreateWindow This is a new parameter. In 9X/NT you can use the new window style. Style you can specify the window style in general, but some special window style, such as top-level window must be specified in this parameter. If you do not specify any particular style, it serves to this parameter set to NULL.
lpClassName: (required). ASCIIZ form of window class name of the address. Can be your custom class, it can be the predefined class name. As described above, each application must have a window class.
lpWindowName: ASCIIZ form of the name of the address window. The name appears in the title bar. If this parameter blank, the title bar nothing.
dwStyle: window style. Here you can specify the appearance of the window. You can specify this parameter is zero, but not as the window system menu, there is no maximize and minimize buttons, there is no close button, so you have to press Alt + F4 to close it. The most common window class style is WS_OVERLAPPEDWINDOW. A kind of window style is a bitwise mask, so that you can use "or" the window you want style or up. As WS_OVERLAPPEDWINDOW is the most inconvenient by several common style or up.
X, Y: the upper left corner of the window specified in pixels of the screen coordinates. Default can be specified as CW_USEDEFAULT, so Windows will automatically specify the most suitable location window.
nWidth, nHeight: in pixels of the window size. Default can be specified as CW_USEDEFAULT, so Windows will automatically specify the most suitable size of the window.
hWndParent: parent window handle (if any). This parameter tells Windows that this is a child window and his parent window is. This MDI (multiple document structure) is different here is not limited to child window and parent window client area. He just used to tell Windows paternity between the various windows in order to destroy the parent window is destroyed together with its child windows. In our example program, because only one window, so set this parameter to NULL.
hMenu: WINDOWS menu handle. If only the system menu is designated the parameter NULL. Looking back WNDCLASSEX structure lpszMenuName parameters, it also specifies a menu, this is a default menu, any class derived from the window If you want to use other menu windows need re-specified in the parameter. In fact, this parameter has a dual meaning: on the one hand, if this is a custom window menu handle on behalf of the parameter, on the other hand, if this is a pre-defined window, the argument on behalf of the window ID. Windows is based on lpClassName parameter to distinguish between a custom window or predefined window.
hInstance: create the instance of the application window handles.
lpParam: (optional) point to the window want to pass data structure pointer type parameters. If the window in the production of MDI in the delivery CLIENTCREATESTRUCT structure parameters. In general, the total value of zero, which means that there is no parameter to the window. By GetWindowLong function retrieves the value.


mov hwnd, eax
invoke ShowWindow, hwnd, CmdShow
invoke UpdateWindow, hwnd

After the success of calling CreateWindowEx, the window handle in eax of. We must save this value for later use. We have just created a window does not automatically display, it must call ShowWindow to follow our hope that the way to display the window. The next call UpdateWindow to update the client area.

. WHILE TRUE
invoke GetMessage, ADDR msg, NULL, 0,0
. BREAK. IF (! Eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
. ENDW

This time we have a window on the screen. But it can not receive messages from the outside world. Therefore, we must provide relevant information to it. We cycle through a message to complete the work. Each module has only one news cycle, we continue to call the GetMessage to get a message from Windows. GetMessage passes a MSG structure to Windows, then Windows in the function of filling the relevant information, has been to Windows to find and fill GetMessage will return to the good news. During this time, control of the system may be transferred to other applications. This constitutes a multi-task structure under Win16. If GetMessage received WM_QU99v message will return FALSE, so that the end loop and exit the application. TranslateMessage is a utility function is a function, it received the original key messages from the keyboard, and then interpreted WM_CHAR, in the WM_CHAR into the message queue, because after the explanation of the message containing the ASCII key code, scan code than the original good understanding much more. If your application does not deal with key messages, you can not call the function. DispatchMessage will send a message to the window procedure responsible for the function.

mov eax, msg.wParam
ret
WinMain endp

If the news cycle is over, exit code stored in the wParam in MSG, you can put it in eax register to pass the current Windows does not use Windows to the end of the code, but we'd better comply with the Windows standard has anti-accident.

WndProc proc hWnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM

It is our window handler. You can easily give the function name. The first parameter hWnd is the handle of the window to receive messages. uMsg is to receive messages. Note uMsg is not a MSG structure, in fact, only a DWORD type on the number. Windows define hundreds of messages, most of your application will not handle the. When news of the window occurs, Windows will send a related message to the window. The window procedure handler is smart to deal with these messages. wParam and lParam only additional parameters, to facilitate the transfer and the message more relevant data.

. IF uMsg == WM_DESTROY
invoke PostQuitMessage, NULL
. ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
ret
. ENDIF
xor eax, eax
ret
WndProc endp

Key part of the above can be said. This is why we need to write Windows programs a major part of the rewrite. Here you check the Windows transfer program over the news, if news is we are interested to be addressed, dealt with, pass 0 in eax register, or must call DefWindowProc, to the window procedure receives the parameters passed to the lack of Province window handler. All messages you have to deal with the WM_DESTROY, when your application at the end of Windows to deliver the news came in an application when you explain to the message on the screen when it has disappeared, which is only to inform your application window has been destroyed, you must prepare their own return to Windows. In this message, you can do some cleanup, but can not prevent exit the application. If you want to do that, you can handle WM_CLOSE message. After processing the clean-up work, you must call PostQuitMessage, the function will WM_QU99v message back to your application, but the message will make GetMessage return, and put 0 in eax register, and then the end of the message loop and return WINDOWS . You can call your program DestroyWindow function, which sends a WM_DESTROY message to your own applications, thus forcing it to withdraw.






Recommended links:



Articles About Audio Players



Jia Peng Lei: "diversity" Denatured



YUV to AVI



IP and MAC binding of crack



Teach You Quickly Learn How To Record "unknown Error" Occurs



Easy to use Music Composers



Experts say too EARLY to lower domestic oil prices



DV To AVI



Consumer NAS Me and you?



Fireworks produced blue and white PORCELAIN button



global China group in collaboration based global



Premier Religion



Brief Science - Screen Savers



Save Delphi: Chinese open source community an excellent opportunity to display strength



MPEG to MOV



PHS Delisting Who Is In Charge



Thursday, September 16, 2010

FreeBSD Serial (35): serial port and modem


LAN to FreeBSD and Internet (or other wide area network) connection, you need to use the wide area network interface. For the average user, using ordinary telephone lines for dial-up way, it is more common practice. This requires first to use the computer's serial port to connect to the modem (modem), the further through the modem to connect to the Internet.


Serial port and modem

So if using a computer dial-up connection to the remote, you must configure the computer's serial port and a good modem.

Personal computers generally have two serial ports, DOS, called COM1, COM2, FreeBSD Unix habit of using the array starting from 0, corresponding to the serial port hardware sio0, sio1. Start the system will automatically detect the hardware, test results appear on the screen, you can log in to use dmesg to see the startup information to determine whether the hardware actually being detected. If the serial port is detected, you can use to connect to the appropriate serial port on the external modem to connect.

If you use the built-in modem card, the card will include a serial device, according to the card's settings, the serial device can sio2 or sio3, we must ensure that the kernel support for the third, fourth serial devices sio2 and sio3. But with the DOS is different, modem cards can not be used with existing serial port IRQ sharing hardware resources. Since DOS is a single task operating system, can not use both serial ports, IRQ sharing is possible, therefore COM1 and COM3 share IRQ 4, COM2 and COM4 share IRQ 3. But for multi-user operating system, FreeBSD is concerned, there will be multiple processes simultaneously access devices, each device must occupy a separate IRQ, it is necessary modem cards in the kernel will set another free IRQ value.

To change the jumpers on the card or run the Setup program in DOS, change the card settings to make the hardware settings are consistent with the kernel configuration. PNP modem card is usually the correct set of hardware resources can also be reset by UserConfig.

When the FreeBSD kernel detects serial device, the device will be able to file through the corresponding access the serial port of the. Corresponding to the first serial device sio0 documents / dev/ttyd0 and / dev/cuaa0, corresponding to the second serial port sio2 device file / dev / tty d1 and / dev/cuaa1, and so on.

FreeBSD provides two serial ports on a device file, in fact, they correspond to the same hardware, only slightly different properties. cuaa0 mainly used to allocate, ttyd0 mainly used to dial and direct connection. Setting these two devices as the reason for a computer and modem to communicate data between two categories, one for the computer to the modem through the serial port to send control commands, used for the AT commands Hayes, the data is sent to the modem, but another computer via modem to send data to the telephone line transmission data, which only you can let the modem to modem. For the application in terms of, to a very simple to distinguish between the two data, the initial state can use two different devices file.

When an external dial-house, the telephone connection has been set up, and data transmission is between the computer and telephone network, modem to modem only, this time on the use of ttyd0. When the outward dialing, modem not establish a connection, the computer should send the command to the modem, control the implementation of dial-up modem, etc, then use the device file on cuaa0. Once the connection is established, the system will reset the device file's properties, making cuaa0 data is also sent to the phone line.

So ttyd0 and cuaa0 two device files, but different initial conditions, and are not essential differences. In fact most of the dial-up software will reset the device file of the state, which device to use dial-up process can be completed properly. However, the practice is still customary to use cuaa0 used to allocate, ttyd0 as a dial, so to avoid some of the software can not correctly reset the device file of the state of the problem.






Recommended links:



quicktime rmvb



Photo 6 of a tough, for the first magic



"COTTAGE XP" national dream



Convert m2ts to mkv



Articles about Games Simulation



MMOG / LE assessment of the road Troika



J2ME Learning Reviewing the Old Posts



Matroska format



Ghost 20 little-known practical parameters



E-cology In The Pan Micro Series 14



Talent war broke out, the direct selling INDUSTRY executives 300 000 -50 million annual salary



XBOX360 rmvb



Recommend Anti-Virus Tools



Wednesday, August 4, 2010

The United States too much control over the domain name is popular in China CN domain name


Recently, the reporter learned from relevant channels: the basis of our two largest Internet service providers and 10,000 net new web, spontaneously began to shift focus recently, the main push CN domain name.

Chinese domain name industry, change is happening. Back in August, the China Internet Network Information Center Director Mao Wei, once predicted: "Next year will exceed the amount of CN domain name registration COM domain name."

In recent years, China has been rumors that Chinese enterprises in foreign companies suffered looting COM domain name news, resulting in the website with the domain of Chinese enterprises lost and die, the company caught in an impasse. Faced with this situation, domestic experts said that the registration rights guaranteed in the CN domain names will be considered to protect Chinese enterprises Yuminganquan the best solution for enterprise security will become options, will greatly improve the company's domain security level .

Recently, well-known Internet service providers 10 000 network, as well as thousands of new web domain agencies, jointly recommended opening of CN domain name business as soon as possible, improve enterprise network security factor. China is waging a "campaign to upgrade the security domain."

It is understood that 10 000 nets from now until December 31 for all 10,000 network users have a COM domain names, allowing them to ultra-low price of 25 yuan corresponding CN domain name registration, quickly escalated into a security CN users. New web all over the country through the activities of the domain name registration solutions delivered to enterprise door. At the same time, thousands of domain name registration agency also is working with higher registrar to launch localized security upgrade program.






Recommended links:



Students job "walking on two legs"



Jobs: find a good quality of the work Of eight major



Free mkv converter



The process of recording impromptu slide show reaction



Sybase Basics



f4v Converter



Flv To 3gp Converter



VOB to flv



Reference Tools Shop



Teach you from complex background using Photoshop cutout dress



Independent research and development of the Sword by CAE



Articles About Communications Tools



evaluation Management AND Distribution



New Source Editors



Communication: four stories, four walls!



Monday, July 12, 2010

DB2 agent works in depth with the connection process



Introduction

DB2 agent (agent) is in the DB2 server service application requests a number of processes or threads. When an external application to connect to DB2 instance access request made, DB2 agent will be activated to respond to these requests. General DB2 agent is known as job agents, job agents about three types: free agents, coordinate the activities of agents, sub-agents.

鈼?free agent: refers to any task agent. This agency does not serve any remote connection does not serve the local connection, in a backup or standby state.

鈼?agency coordination of activities: means the agent is in working condition, each produced by an external application has a database of activities connected to the coordination of activities to the agency it serves.

鈼?sub agency: refers to the coordination agent to accept the work of distribution out of the next level agency. In DB2 V95, only the multi-partition environment (MPP) or a node within the parallel environment (SMP) under which there is sub-agents, in DB2 V95 in all circumstances there may be sub-agent.

DB2 server in a proxy pool, when the instance starts here just have a number of agents (their number depends on the instance of the parameter NUM_INITAGENTS). In the absence of any database connection, they are in standby, is free agency. When there is an external program to connect to the database, the agency began to receive orders to serve in these new connections, then they become the coordination of activities agents. The coordination agent then the gradual breakdown of the request, under an agency that is assigned to the sub-agent to deal with. If the current agents are already working at the same time again a new request, the database manager will generate a new proxy to answer. When the transaction is completed and the database connection is lost, the coordinating agent or to return back into free agent pool agents, or automatically disappear (depending on the instance of the parameter NUM_POOLAGENTS). This is an agency of the life cycle.

Related configuration parameters

Through the implementation of DB2 get dbm cfg and agents can see several examples of related parameters: MAXAGENTS, NUM_POOLAGENTS, NUM_INITAGENTS, MAX_COORDAGENTS, MAX_CONNECTIONS, MAXCAGENTS. The following brief description on what they do:

鈼?MAXAGENTS: This parameter for the current instance of the number of all agents, including the coordination of agents, free agents and sub agents combined. However, in this parameter in the DB2 V95 is no longer used.

鈼?NUM_POOLAGENTS: This parameter is used to control the agent pool, the number of idle agents. When the activities of the agency to complete its work back to become a free agent when the agent pool, if more than this parameter, then the agent will automatically disappear. NOTE: In connection concentrator enabled case, the pool of free agents the number of agents at a time may exceed the size of NUM_POOLAGENTS to deal with unexpected high-density connection.

鈼?NUM_INITAGENTS: This parameter is the instance mentioned above when they just started generating some number of free agents. This is to improve performance, because these agents can always become a coordinated response to external application to request agents, instead of the temporary re-generate a new agent.

鈼?MAX_COORDAGENTS: This parameter determines the instance of the largest coordinated at the same time the number of agents (in a multi-partition environment, a node refers to the maximum number of coordinating agents).

鈼?MAX_CONNECTIONS: This parameter determines the instance to allow connection to a maximum number of connections (in a multi-partition environment, a node refers to the maximum number of connections).

鈼?MAXCAGENT: This parameter determines the number of instances of the token, a coordinating agency can only be a token to the service application. If not token, the coordinating agency can only wait. However, in this parameter in the DB2 V95 has also canceled.







相关链接:



Computer Education Infomation



PPC APE Recorder



Directory Fax Tools



Youtube to Treo Top Rated



M4v



#1 DVD to Zune & Zune Video Converter



Youtube FLV to Divx Plus



Bluesea XBox 360 Deconde



What is a vob file



Video converter mp4 to mpeg



LasVegas YOUTUBE to iPhone



Youtube Movie to Xbox Help



Teaching And Training Tools Report



3gp To avi



Thursday, May 27, 2010

AllRipper AVI to iPod

AllRipper AVI to iPod has the easy convert almost all popular video formats to iPod Video and other various video formats. It supports converting among AVI, MPG, MPEG, WMV, MP4, 3GP, MOV, RM, PSP Video, iPod Video, Zune Video, iPhone Video. VOB to iPod MP4 video and extracting audio from video file and converting to MP3, WAV, AC3, WMA, M4A, OGG, AAC etc.

AllRipper AVI to iPod is a best video and movie converter to iPod! This product offers convert movie to iPod, Easy Convert AVI, MPEG, WMV, MOV, MP4, RM, RMVB, DivX, ASF, VOB, 3GP and etc. AllRipper AVI to iPod helps you watch your music videos and movies on your iPod. In addition, you can also extracting audio from movie or music video and converting to iPod supported MP3 file format!